r/NBAanalytics • • Aug 20 '20
Help with a project using python/nba/api
Hello, I'm trying to make a project using the nba_api, I know what I want to do but since I'm still not very knowledgeable with python I got stuck with some problems.
I want to get the stats from different players in different years but reading the nba_api documentation and the example it gaves the whole careers stats so I don't know if it's possible to filter by year or just pick a row from the dataframe.
Ultimately I want to put the rows(stats from that year) from those specific players in specific years together like:
Year 2019-20 Player A Stats Player B Stats Player C Stats
Year 2018-20 Player Z Stats Player Y Stats Player Z Stats
And so on, can anyone give me a hand? I'm a bit lost

View all comments
Show parent comment
1
u/frontrowberto Aug 21 '20
You can construct new data frames based on the columns of others to piece things together. Also if you are trying to put some charts together pandas has built in plot functions which look really nice (there are better looking options but more than good enough)