-
Notifications
You must be signed in to change notification settings - Fork 344
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
Can't seem to get pitching/batting stats. #381
Comments
Wanted to come back and add/report that importing and using batting_stats_range() and pitching_stats_range() functions seems to work, so I'm assuming it's got something to do w/ fangraphs changing some stuff like another person pointed out in a different issue and the updates need to be reflected. |
I think it is the same issue with #376 Therefore, if you want to have the fix version you might try to uninstall - pip install pybaseball
# if the package has already been installed
+ pip uninstall pybaseball
+ pip install git+https://github.com/jldbc/pybaseball.git@master |
Works for me thx ! |
I'm still getting empty columns but the other functions are working still. First I uninstalled pybaseball from command prompt and then anaconda shell to be sure. Then I copy/pasted your suggested line edit into my notebook file in VS, and when that didn't work I did it from my Anaconda shell. Then I restarted everything, still empty columns. @ss77995ss |
Hi @shortenedname
|
Hey @ss77995ss |
Thanks for the suggestion @ss77995ss, because I hadn't thought of that either. I found copy/pasting the lines as is will lead to a inf. loop and a kernel crash like @tcamino24 is experiencing. I tried using |
@shortenedname @tcamino24
|
@ss77995ss where should i be running that code? in jupyterlabs it just creates an infinite loop and in my command prompt it says pip is not recognized |
Also, you might need to restart your notebook / kernel following the install of %pip install git+https://github.com/jldbc/pybaseball.git@master |
@stephenlacey531 @ss77995ss thank you both for being lovely and helping me out. I got in the terminal of jupyterlabs and uninstalled, then ran the I kind of want to close the issue, but I'll wait for @tcamino24 to read my update and see if what I did works for them |
@tcamino24 |
that worked for the uninstall thank you! when im going to call on the package in jupyterlabs, what should i try and import now? LIke before it was import pybaseball and then from pybaseball import batting_stats. What should replace pybaseball now in the code, something like |
@shortenedname I'm glad to help! @tcamino24 you can still import |
worked flawlessly! thanks so much for the help, thought the FanGraphs update was gonna completely derail the rest of the season. I really appreciate it, take care! |
I am still getting the blank IDfg table. I did the full uninstall and reinstalled using git. I then checked /pybaseball/datasources/fangraphs.py and confirmed that line 14 reads:
I've restarted the jupyter notebook from which I do my weekly stats and am still getting the blank table. Anyone experiencing this or know how to fix? |
Hi @bclark08 could you maybe provide some of your code? |
@ss77995ss thank you for responding! I am at work right now and don't have access to my code, but I will try to remember to give you a code snippet later tonight. I think it is actually an issue with Jupyter Notebook, as I have had similar issues with other packages in the past. On the upside, I was rather frustrated and merged all of my code into a single, locally-saved script and ran it from the command line. This worked flawlessly, which further heightens my suspicion that there is an issue with Jupyter Notebook--I am guessing having something to do with where or how I initially installed and saved it. |
@bclark08 No hurry! BTW, Could you open another issue once you get your code? Since this one is closed. We could discuss in the newest issue. |
I was following a tutorial grabbing batting and pitching stats and my Pandas Dataframe was only returning an Empty Dataframe with the only column being "IDfg". I then went to the repo and copy pasted the batting_stats() and pitching_stats() code examples and am still getting the same thing. Statcast function works for me though, would like to see if I'm doing something wrong
``
The text was updated successfully, but these errors were encountered: