Closed samlafell closed 1 year ago
Hey, thanks for reporting. This is actually a symptom of pypi/pip not picking up the newer release yet. If you install from source using the 2.2.3 version, it imports as the docs mention since it's exported in the init.py. I went through most the docs and the ones that fail to correctly import are all part of this pypi issue. We're working to resolve that now, and will close the issue after.
(Admittedly in some of my responses here I've used the pattern you've mentioned, from pybaseball.module import method
, but that's not the ideal usage pattern from a user standpoint)
Thank you tjburch! I really appreciate the reply.
Example Case: https://github.com/jldbc/pybaseball/blob/master/docs/statcast_pitcher.md
This is wrong. The correct import is:
(Obviously the
as p_ev_barrels
is optional)From what I can tell, this is a pretty widespread error across the documentation and once you figure it out, you're fine for the rest of the imports.
The code chunk I've included works fine. I would fork and PR myself but it's a lot of small changes and would like to maybe tackle it with someone else.