Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate keys #2

Open
jorahn opened this issue Sep 9, 2015 · 1 comment
Open

duplicate keys #2

jorahn opened this issue Sep 9, 2015 · 1 comment
Labels

Comments

@jorahn
Copy link
Owner

jorahn commented Sep 9, 2015

make sure dictionary keys are not overwritten by duplicates

example:
path = folder with two differently named zip-files (a.zip, b.zip)
containing one csv-file each with the same filename (data.csv)
=> dict = { 'data.csv' : pd.DataFrame }

also keep keys as short and simple as possible!

maybe check if new key in dict and enumerate equal keys (data.csv_0, data.csv_1 ...)

@jorahn
Copy link
Owner Author

jorahn commented Sep 10, 2015

occurs in babynames example. preliminary fix: disabled shortening the key if only one element in path to the name of the element. instead the key is sourcefile_element.

in the above example, this would result in
=> dict = {'a.zip_data.csv': df1, 'b.zip_data.csv': df2}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant