WIP - Response to Issue #292: Pandas Pickle data reader and writer#303
WIP - Response to Issue #292: Pandas Pickle data reader and writer#303skrawcz merged 14 commits intoapache:mainfrom benhhack:bh-pandas-pickle-292
Conversation
Yep so good point 😅 . Here's what I think:
How does that sound? |
|
How robust would you like the testing? |
… implemented in test_pandas_extensions.py.
I think the test you have is fine; the PR is looking great! How about point (4) above? I think all that we need now is an example of usage. |
|
Should have the full request completed tomorrow/Wednesday. I'm a little more confused about point 4 so would appreciate feedback. |
Sounds good. Yeah once you have something up, happy to comment. |
Sorry for the delay, I've put up a first attempt at the script for pandas/materializers. Was quite confused about what was going on in the materialization module so did it in a very basic way. Let me know if you have any pointers and I'll see if I can fix. |
skrawcz
left a comment
There was a problem hiding this comment.
Looking great!
For examples, we're trying to also include a notebook version of how to run things. So after my_script.py is done, if you could create notebook file that's equivalent to it, that would be great please!
|
@benhhack https://github.com/benhhack/hamilton/pull/1 shows the fix. If you merge it I think this PR should also update. |
Fixes example to call things appropriately
Was missing an import, and removed duplicate code.
Thanks @skrawcz ! I really appreciate the support and active communication. Do you have any feedback on my work style/code/anything you can think of that could help me improve? For social media purposes, my LinkedIn is https://www.linkedin.com/in/benjaminhhack. |
You're welcome! -- Nothing really of note. You did well with little instruction! Code passed our formatter, looked like our other code. You added a test for it. I tested it, it worked. I omitted asking you for a nice commit message/tidying up the commit history. So I can ask for that next time :) Want to pick up more materializers? They should look pretty similar to what you just did. I can also think of a harder task.... 😀 |
|
You can see your contribution now showed up in our docs too --https://hamilton.dagworks.io/en/latest/reference/io/available-data-adapters/#data-savers |
Thanks for the feedback, always good to learn and grow. I'll get back to you re picking up other materialisers, am currently deep in the job hunt so I don't have too much spare time. Hopefully will chat again soon. |
|
@benhhack hi. how did you decide which kwargs (e.g., compression, storage_options) to include in the Pandas pickle data reader/writer? |
Hey, @bryangalindo , I used all of them! Or, at least, I gave the option for the user to use them all while setting defaults. I'm not really sure how this translates to practical use, you'd have to ask @skrawcz about that. My process was to give a type hint for each of the kwargs depending on what was written in the pandas io docs. The typing library came in very handy here. I'd then just set the variables in the Hope this helps, let me know if I can clarify anything else. |
Response to Issue #292 which required the implementation of classes for reading and writing Pickle files with Pandas
Changes
Implemented the PandasPickleReader and PandasPickleWriter classes in pandas_extensions.py
How I tested this
I looked for the polars tests and couldn't find them and am unsure how to test these classes, please provide some assistance.
Notes
Implementation closely followed the Pandas Pickle documentation and the example Polars classes provided
Checklist