Aug-01-2019, 07:48 PM
Hi There,
I am trying to filter Data, for Excel Files in Pandas. Based on the Column Value i.e. String Value.
I managed to get, some data displayed before, but have gone wrong somewhere. As only the Chosen Column Names display, now when I run the Code, in Python 3.7.
Here is the Website Link to the XLS File, if someone could download the File, and tell me where I am going wrong :-
http://web.archive.org/web/2009080423493...6AA506.xls
Here is my latest Code :-
Any help would be much appreciated.
Regards
Eddie
I am trying to filter Data, for Excel Files in Pandas. Based on the Column Value i.e. String Value.
I managed to get, some data displayed before, but have gone wrong somewhere. As only the Chosen Column Names display, now when I run the Code, in Python 3.7.
Here is the Website Link to the XLS File, if someone could download the File, and tell me where I am going wrong :-
http://web.archive.org/web/2009080423493...6AA506.xls
Here is my latest Code :-
import pandas as pd data = pd.read_excel (r'C:\Users\Edward\Desktop\BBMF Schedules And Master Forum Thread Texts\BBMF Display Schedule 2009.xls') df = pd.DataFrame(data, columns= ['Venue','A/C','DISPLAY/','Date']) df[(df['Venue'].str.contains('[a-zA-Z]') & df['A/C'].str.contains('DHS')) & (df['A/C'].str.contains('DSS')) & (df['A/C'].str.contains('DAK')) & (df['A/C'].str.contains('HS')) & (df['A/C'] != 'L') & (df['DISPLAY/'].str.contains('DISPLAY'))]As you can see from the Code, I want data to display, based on Column Values.
Any help would be much appreciated.
Regards
Eddie