Aug-02-2019, 04:59 PM
(This post was last modified: Aug-02-2019, 04:59 PM by eddywinch82.)
Many thanks for reply scidam, I changed my Code to the following, and the Data is almost displaying How I want :-
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['DISPLAY/'].str.contains('DISPLAY') & df['A/C'].str.contains("DHS|DAK|HS")) & (df['A/C'] != 'LHS') & (df['A/C'] != 'LANC'))]How do I Code, so that only the rows show for DAK and HS, where the Venue is the same above and below, i.e. Two KEMBLE one Above and below, when one One row in the A/C Column says DAK and the row below or above says HS, normally below. Ideally I would like to change, DAK and HS to DHS and only one Venue row, i.e. not two KEMBLES just one in one Row. Any Ideas ?