0

Code:

from nba_api.stats.endpoints import commonteamroster
spurs = commonteamroster.CommonTeamRoster(team_id=1610612759).get_data_frames()
print(spurs)

Results:

[        TeamID SEASON LeagueID  ... EXP                           SCHOOL PLAYER_ID
0   1610612759   2020       00  ...   2                            Miami   1629022
1   1610612759   2020       00  ...   1                         Kentucky   1629640
2   1610612759   2020       00  ...   3                         Colorado   1628401
3   1610612759   2020       00  ...   3                       Washington   1627749
4   1610612759   2020       00  ...  11  St.Mary's College of California    201988
5   1610612759   2020       00  ...  11              Southern California    201942
6   1610612759   2020       00  ...  14                            Texas    200746
7   1610612759   2020       00  ...   2                     Oregon State   1629234
8   1610612759   2020       00  ...   1                Mississippi State   1629683
9   1610612759   2020       00  ...   1                   Union Olimpija   1629677
10  1610612759   2020       00  ...  14                      Connecticut    200752
11  1610612759   2020       00  ...   R                    Florida State   1630170
12  1610612759   2020       00  ...   4                             Utah   1627751
13  1610612759   2020       00  ...   2                       Ohio State   1628966
14  1610612759   2020       00  ...   R                             Duke   1630200
15  1610612759   2020       00  ...   5                         Kentucky   162

How do I go about getting all the data to show up without the "..." in between each category? Or is there a way for me toe export said data into excel or a way to visualize it?

1 Answers1

0
pd.set_option('display.max_columns', None)
pd.set_option('display.max_colwidth', None)
QHarr
  • 83,427
  • 12
  • 54
  • 101
  • 2 different lines ofc don't know why it posted that way – Michael Black Mar 23 '21 at 01:49
  • 1
    Some commentary as to why this solves the problem would make this answer more useful. To format as code you need to indent the code lines e.g. select all code and press Ctrl + K – QHarr Nov 28 '21 at 02:56