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

merging dicts with the same keys #31

Open
hematthi opened this issue May 19, 2022 · 0 comments
Open

merging dicts with the same keys #31

hematthi opened this issue May 19, 2022 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@hematthi
Copy link
Collaborator

dict1 = read_metadata_from_fits(f,hdu=1,fields=fields_to_save,fields_str=fields_str_to_save)
dict1[:Filename] = filename
dict2 = read_metadata_from_fits(f,hdu=2,fields=fields_to_save,fields_str=fields_str_to_save)
dict3 = read_metadata_from_fits(f,hdu=3,fields=fields_to_save,fields_str=fields_str_to_save)
dict = merge(dict1,dict2,dict3)

Merging dicts with the same keys will result in storing values from the last dict... check if that's OK

@hematthi hematthi added the help wanted Extra attention is needed label May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant