-
Notifications
You must be signed in to change notification settings - Fork 22
Give Pandas writer option to write labels in place of codes #242
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
Conversation
- Add headers for all requests. - Drop header entries for these sources in sources.json.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #242 +/- ##
==========================================
- Coverage 98.91% 97.98% -0.93%
==========================================
Files 105 105
Lines 8910 8922 +12
==========================================
- Hits 8813 8742 -71
- Misses 97 180 +83
🚀 New features to boost your workflow:
|
|
Howdy, thanks—this is a welcome direction, but I am not sure what is the right implementation. A few bits of info about the implementation:
That being said, I don't want to force 3(i) on you, since it would be a bunch of work. So I think it is worth expanding this PR with tests (using specimens, instead of network calls), docs, etc., and then using that as a stepping stone to that larger improvement. |
|
I can certainly use labels with values id (as default), name (add to what is mentioned in your docs but its in the standard), and both. I can align my implementation with the output of CSV and remove the not implemented on labels from the csv writer. What I'm not sure about is how you'll best support multiple versions of the writers for example 1.0.0 and 2.0.0 for SDMX-CSV formats. I think it would be important to have some idea around this before fully trying to do 3(i). |
The
So the idea would be to have a roughly similar approach for other reader and writer submodules, whether for SDMX-CSV, JSON, or other. However, again, I feel bad that this architecture is not thoroughly documented, such that I have to type this explanation here instead of linking to some existing developer docs. Please, if you don't mind, I'll try to start a separate branch that creates a natural (and hopefully easier to understand) place for this feature to land. Then we can incorporate the changes from your branch here. In the meantime, if you could go ahead with creating tests/specimens that express the behaviour you have in mind for this new feature, we can incorporate those in the new branch along with the code you've already written. |
The goal is to provide support for labels in the simple case where the data message includes the structure.
I added a parameter to write_dataset to allow for labels. If True write dataset will check is dsd is present (similar to _maybe_convert_datetime).
I would like to get feedback on the general approach before updating doc, checking against additional sources, error handling, etc.
Example usage:
output: