+ 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

28th Dec 2018, 4:08 AM
yan yu
yan yu - avatar
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
28th Dec 2018, 10:48 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 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)
29th Dec 2018, 9:01 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
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.
29th Dec 2018, 3:03 AM
yan yu
yan yu - avatar