Everybody is good, have a question want to consult, python pands how to obtain a excel columns of 8 bits of data before
For instance only extract 30508083 these data, thanks
CodePudding user response:
If is the first column B line 11, the code can
import pandas as pd Df=pd read_excel (r * * *. XLSX, skiprows=9, nrows=1, usecols="B") Print (df) iloc [0]. Values [0]) Including 1 nrows represents how many rows of data, representative will take a line;
Refer to the website for more information:
https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html#pandas.read_excel
CodePudding user response:
Try using iloc [0:8] can not
CodePudding user response:
Thank you,
, I'll give it a try
CodePudding user response:
reference 1/f, happy pigs response: if it is the first column B line 11, the code can import pandas as pd Df=pd read_excel (r * * *. XLSX, skiprows=9, nrows=1, usecols="B") Print (df) iloc [0]. Values [0]) Including 1 nrows represents how many rows of data, representative will take a line; Refer to the website for more information: https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html#pandas.read_excel hello, I'm taking B column there before eight or 30508083 of these data, not taking the whole column