nba_api
nba_api copied to clipboard
[Bug]: WNBA Commissioner's Cup PlayerGameLogs data non-existent for 2023 season.
NBA API Version
1.2.1
Issue
Issue:
Commissioner's Cup data is non-existent when getting WNBA PlayerGameLogs data for 2023
season
Notes:
Trying to get playergamelogs
for the Las Vegas Aces vs. New York Liberty.
The game from 8/15/2023 is not showing up. This is an out of place game but is still within season.
ESPN has it listed here as a Regular Season game.
For season_type_nullable
, I tried Regular Season
, Pre Season
and even Playoffs
and All Star
.
None of them grabs the data for that specific date but games before and after that appear.
Steps:
- Get
PlayerGameLogs
- Make surveleague_id_nullable
is set to10
andseason_nullable
to2023
- Convert
PlayerGameLogs
to aDataFrame
- Filter the
DataFrame
to show onlyLVA
games and drop empty rows. - Print the
DataFrame
or export it to a file format like.csv
- Observe the data.
Result:
I expected Commissioner's Cup game data to appear in the PlayerGameLogs
dataset.
Code
from nba_api.stats.endpoints import playergamelogs
import pandas as pd
from datetime import date
def main():
gl = playergamelogs.PlayerGameLogs(
season_nullable="2023",
league_id_nullable="10",
season_type_nullable="Regular Season",
)
gl_df: pd.DataFrame = gl.get_data_frames()[0]
filter = gl_df["TEAM_ABBREVIATION"] == "LVA"
gl_df = gl_df.where(filter).dropna(how="all")
print(gl_df)
gl_df.to_csv(f"{date.today()}-output.csv", index=False)
pass
if __name__ == "__main__":
main()