-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add _as_tensor_variable
converter for pandas objects
#5920
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 _as_tensor_variable
converter for pandas objects
#5920
Conversation
Codecov Report
@@ Coverage Diff @@
## main #5920 +/- ##
==========================================
+ Coverage 89.53% 89.55% +0.02%
==========================================
Files 73 73
Lines 13267 13271 +4
==========================================
+ Hits 11878 11885 +7
+ Misses 1389 1386 -3
|
ArviZ has a dependency on pandas already, so you can import it right away: https://github.com/arviz-devs/arviz/blob/main/requirements.txt#L6 I'd still add it to the requirements and conda envs though. A good placement for this function might be close to the top of the file, because there's already a function for converting observed data, which is slightly similar. Any idea what to do with multi-indexed DataFrames? |
Oh, we removed pandas dependency on purpose but we didn't check if any of our dependencies required it... That's a shame :/ |
I think this first iteration is ready for review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but I'll ask in the chat for a second person to look at it & merge (assuming the pipeline goes green).
Fix type annotations in tests
The changes requested by @ricardoV94 were made. Thanks for this contribution @juanitorduz ! |
This is an attempt to solve #5877
@ricardoV94 I went through
pymc/aesaraf.py
but I could not figure out by myself where to add your suggestion. I decided to open a PR anyway but I would appreciate some hints on which function this has to be included and tested 🙏