Aug-05-2019, 07:54 PM
(This post was last modified: Aug-05-2019, 07:54 PM by eddywinch82.)
I typed the following :-
To get all occurances of a particular BID Number. What do I type, so that all Rows, With a Bid Number value_count of 1 I remove leaving the remaining rows, i.e. only the Duplicates ?
This is my latest Python Code :-
df['BID'].value_counts()
To get all occurances of a particular BID Number. What do I type, so that all Rows, With a Bid Number value_count of 1 I remove leaving the remaining rows, i.e. only the Duplicates ?
This is my latest Python Code :-
import pandas as pd xls = pd.ExcelFile(r'C:\Users\Edward\Desktop\BBMF Schedules And Master Forum Thread Texts\BBMF Display Schedule 2009.xls') data = pd.read_excel(xls, sheet_name="Sheet1") pd.options.display.max_rows = 1000 df = pd.DataFrame(data, columns= ['Venue','A/C','DISPLAY/','Date','BID']) df[(df['Venue'].str.contains('[a-zA-Z]') & (df['DISPLAY/'].str.contains('DISPLAY') & df['A/C'].str.contains("DHS|DAK|HS|SPIT")) & (df['A/C'] != 'LHS') & (df['A/C'] != 'LANC'))]