Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

df select first n rows

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #df #select #rows
ADD COMMENT
Topic
Name
6+9 =