Problem: Select first N rows and last row in Python Pandas.
only gets 1 row which is index 9 and last row.
df.iloc[[(9),-1]]
I thought I could get using head and last row but not working.
df.iloc[[head(9),-1]]
Target output:0123up to9last row
Problem: Select first N rows and last row in Python Pandas.
only gets 1 row which is index 9 and last row.
df.iloc[[(9),-1]]
I thought I could get using head and last row but not working.
df.iloc[[head(9),-1]]
Target output:0123up to9last row