I have a question regarding page 5 of 'Working with Missing and Duplicate Data" section. My code works in the Dataquest terminal but wouldn’t work when I run it locally. Here’s the issue:
- Before I do anything, the “combined” dataframe has as shape of 492 by 17, and the “regions” dataframe 328 by 2.
- I left merge them using the following command: combined = pd.merge(left=combined, right=regions, how=‘left’, on = ‘COUNTRY’)
- In the Dataquest terminal “combined” becomes 492 by 18 (as intended), but in my local machine it becomes 984 by 18 (with all rows duplicated).
I found this somewhat helpful but it didn’t quite solve the issue. Could someone explain/help? Thank you.