I have a csv file containing three columns. This link shows how my Dataframe is organized: https://github.com/phdvidal92/Files/blob/master/Data_Qnty.csv.
I would like to let just some records presented. For the SectionA, values equals to "Propose" and for the SectionB just "Prospecting".
I'm importing it with pandas read_csv
arqv2 = pd.read_csv('Data_Qnty.csv', skiprows = 2,
delimiter = ',', encoding = 'latin1')
After it, i'm trying to use drop
arqv2 = arqv2.drop(arqv2[(arqv2['SectionA'] != 'Prospecting') && (arqv2['SectionB'] != 'Propose')].index)
And it's not working. Do you know how can i achive my objective?
Thanks!
arqv2.head()to see what you have ? If youskiprows=2then you skip headers and your DF doesn't use names'SectionA''SectionB'. Maybe you should read all and later drop rows to keep headers.