📜  df 选择前 n 行 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:33.189000             🧑  作者: Mango

代码示例1
df2 = df.head(N)
# this should select N rows from top and copy to new df
df3 = df.tail(N)
# this should select N rows from bottom and copy to new df