preseason_career_totals and preseason_season_totals don't appear anywhere in this module as methods, yet they are listed in the readthedocs wiki page.
Using this code:
for i in range(0,10):
time.sleep(.5) #pause to prevent stats.nba.com from blocking my IP
test = [] #initialize dataframe
fn=name1[i] #assign first name from name1 column
ln=name2[i] #assign last name from name2 column
pid= get_player(fn,ln) #get player id from stats.nba.com
career=player.PlayerCareer(pid) #call player Career module
#this is where the problem begins! I can call the
# career.college_season_career_totals() but I can't get the
#preseason_career_totals() attribute to work
##################### PROBLEM IS HERE #############################
#out=career.college_season_career_totals() #this line works (Number 1)
out=career.preseason_career_totals() #this line doesn't (Number 2)
##################################################################
I get the error message from number 2:
Traceback (most recent call last):
File "app.py", line 33, in
out=career.preseason_career_totals() #this line doesn't
AttributeError: 'PlayerCareer' object has no attribute 'preseason_career_totals'
I looked at the json object being scraped from the api and there doesn't appear to be any preseason data included. What am I doing wrong?
preseason_career_totals and preseason_season_totals don't appear anywhere in this module as methods, yet they are listed in the readthedocs wiki page.
Using this code:
for i in range(0,10): time.sleep(.5) #pause to prevent stats.nba.com from blocking my IP test = [] #initialize dataframe fn=name1[i] #assign first name from name1 column ln=name2[i] #assign last name from name2 column
I get the error message from number 2:
Traceback (most recent call last): File "app.py", line 33, in
out=career.preseason_career_totals() #this line doesn't
AttributeError: 'PlayerCareer' object has no attribute 'preseason_career_totals'
I looked at the json object being scraped from the api and there doesn't appear to be any preseason data included. What am I doing wrong?