Deduplication of Dataframe returning empty object

Viewed 992

I have 2 csv files with similar columns. I am reading and concatenating them with the following code:

One = pd.read_csv("/Users/xxx/Documents/Domains/Malaysia - MAR.csv" )
Two = pd.read_csv("/Users/xxx/Documents/Domains/Malaysia - CR.csv" )


links_webtrends_my = pd.concat([One,Two])

links_webtrends_my = links_webtrends_my['Page']

links_webtrends_my = links_webtrends_my.to_frame(name='Page')

I then use this line to drop duplicates

links_webtrends_my = links_webtrends_my.drop_duplicates(keep='first', inplace=True)

When I do this, it deletes everthing in it. When I call links_webtrends_my afterwards, it doesnt return anything. I will appreciate guidance on this.

1 Answers
Related