pydantic-extra-types icon indicating copy to clipboard operation
pydantic-extra-types copied to clipboard

✨ add `pandas.Series`

Open EkberHasanov opened this issue 2 years ago • 8 comments

  • add pd.Series support to the pydantic_extra_types.pandas_types module
  • created tests for series type
  • add docs for basic usage

Selected Reviewer: @Kludex

EkberHasanov avatar Jun 25 '23 15:06 EkberHasanov

Thanks for the initiative @EkberHasanov its look a good PR and worth to work in, as i can see the issue is regarding py37 and missing dependencies do you think its worth re-open it and work on it ?

yezz123 avatar Jun 29 '23 09:06 yezz123

Thank you for your feedback, @yezz123 . I appreciate your positive remarks about the PR. I'm definitely interested in working on it further and ensuring that it works flawlessly without any remaining issues, but I don't know should I continue to change something and push it, because it failed so much and frustrated me.

EkberHasanov avatar Jun 29 '23 10:06 EkberHasanov

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (e186814) to head (09e073d). Report is 11 commits behind head on main.

:exclamation: Current head 09e073d differs from pull request most recent head 811d664. Consider uploading reports for the commit 811d664 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##              main       #68    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           11         8     -3     
  Lines          685       552   -133     
  Branches       169       140    -29     
==========================================
- Hits           685       552   -133     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 30 '23 09:06 codecov[bot]

please review

yezz123 avatar Jun 30 '23 19:06 yezz123

I'm unsure if we should make it possible to instantiate Series with __init__.

Maybe it's better to not have the __init__, and only implement the __get_pydantic_core_schema__.

Oh yes, I guess inheriting the Series class from pd.Series makes this implementation much cleaner and more aligned with the existing functionality of pd.Series. Regarding the __init__ method, you're absolutely right that it may not be necessary. Since we are inheriting from pd.Series, we can rely on its default behavior for instantiation.

Thank you for pointing out this alternative approach. I'm excited about this implementation as it provides a more elegant and intuitive way to work with series data using Pydantic. Thank you for your feedback!

EkberHasanov avatar Jul 03 '23 11:07 EkberHasanov

@EkberHasanov how it is going? should somebody catch up and finish this PR? thank you

dzmitry-lahoda avatar Feb 20 '24 11:02 dzmitry-lahoda

@EkberHasanov how it is going? should somebody catch up and finish this PR? thank you

Hi @dzmitry-lahoda it's all good, thanks! I have made some changes last time, but i guess i have to update library versions now. I will give it a try to update the versions of the libraries and see what is going on, and then i will let you you know if I need further help. Thanks

EkberHasanov avatar Feb 25 '24 18:02 EkberHasanov

Hi @dzmitry-lahoda, hope you're okay. I guess, I may need help to resolve all these issues. Could someone please help or perhaps explain what and where is wrong? I though I know, but it seems i'm wrong.

EkberHasanov avatar Feb 29 '24 12:02 EkberHasanov