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

Add metadata to dataFrame #2

Open
sblack-usu opened this issue Feb 7, 2020 · 0 comments
Open

Add metadata to dataFrame #2

sblack-usu opened this issue Feb 7, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sblack-usu
Copy link
Collaborator

The following metadata needs to be added to the dataFrame returned from all functions that return a dataFrame:

  • url
  • queryTime

More metadata will be provided at a later time. Much of the metadata is dependent on the endpoint that is called, we'll have to do a more thorough audit of the R tool to find out what this metadata is and implemented. Right now we should just focus on the metadata implementation.

The pandas module currently does not have embedded metadata. It is something that is being considered (for the last 7 years or so) but not implemented. There are suggestions and incomplete implementations available, much of which is documented here pandas-dev/pandas#2485

I'm in favor of monkey patching for now until pandas has an official implementation. With this approach, we'll just add metadata as fields to the dataFrame before returning it. This will be simple to implement. The major drawback is that the metadata isn't actually a part of the dataFrame so if a user were to run a dataFrame method that results in a new dataFrame being created, the metadata would not be carried to the new dataFrame. I don't believe this is a big deal but am open to input. We can easily provide a method that copies our metadata between dataFrames as a convenience function for the user. This will be easy to use, but will require the user to know about and use.

Acceptance Criteria:

  • Establish an implementation for metadata in this library.
  • url and queryTime metadata is available on all dataFrames returned by this library.
@sblack-usu sblack-usu added the enhancement New feature or request label Feb 7, 2020
@sblack-usu sblack-usu self-assigned this Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant