Answers for "pandas read_csv iloc"

2

isolate row based on index pandas

dfObj.iloc[: , [0, 2]]
Posted by: Guest on March-30-2020
1

pandas return specific row

df.iloc[1] # replace index integer with specific row number
Posted by: Guest on December-10-2020
0

return df.iloc[1:]

>>> df.iloc[1:3, 0:3]
      a     b     c
1   100   200   300
2  1000  2000  3000
Posted by: Guest on October-20-2020

Python Answers by Framework

Browse Popular Code Answers by Language