+ 1
Dataframe(Read excel csv file )
I want to find the 0th line. If it is the beginning of A, I will output all the information. How do I do it? Thanks
3 Answers
+ 4
You can do it easily with pandas Dataframe, pd.read_excel(filename, header=None, ...)
https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_excel.html
+ 2
If you want to use pd.filter you can specify the regex parameter and tell it to filter by rows:
# assuming your DataFrame is df
df.filter(regex='^A\w+', axis=0)
0
What if you use filter()?
country year
0 Afghanistan 1952
1 Albania 1962
2 Benin 1952
3 Cambodia 1982
..
And I want to find out what to do at the beginning of A.