You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import pybaseball
import pandas as pd
def getFanGraphsBattingStats(start=2020, end=2021):
for i in range(start,end+1):
data = pybaseball.batting_stats(i)
data.to_csv(f'Data/FanGraphs/Batting/{i}_fangraphs_batting.csv',index=False)
print(data)
def getFanGraphsPitchingStats(start=2020, end=2021):
for i in range(start,end+1):
data = pybaseball.pitching_stats(i)
data.to_csv(f'Data/FanGraphs/Pitching/{i}_fangraphs_pitching.csv',index=False)
print(data)
if __name__ == "__main__":
pybaseball.cache.enable()
getFanGraphsBattingStats()
getFanGraphsPitchingStats()
It does not get the pitching stats as intended, as shown below:
When running the following code:
It does not get the pitching stats as intended, as shown below:
The text was updated successfully, but these errors were encountered: