Where are the Unity Editor Logs?

If you run the Unity Editor and erased the Console Log, you might want to access the previous Editor Log.

They are in the following folders:

macOS ~/Library/Logs/Unity/Editor.log 
Windows C:\Users\username\AppData\Local\Unity\Editor\Editor.log
Windows with Backslashes C:/Users/username/AppData/Local/Unity/Editor/Editor.log

Check the above folders for your operating system and check out the log!

Where are the Unity Standalone .exe Game Logs?

If you have downloaded a Unity Standalone game folder, and the game crashes or has problems, you might need to check the Standalone .exe logs.

They are in the following folders:

macOS ~/Library/Logs/Company Name/Product Name/Player.log
Windows C:\Users\username\AppData\LocalLow\CompanyName\ProductName\Player.log
Windows with Backslashes C:/Users/username/AppData/LocalLow/CompanyName/ProductName/Player.log
Linux ~/.config/unity3d/CompanyName/ProductName/Player.log

Check the above folders for your operating system and check out the log!

How to Setup Bash on Windows 10 for Developers – Ultimate Setup

Bash for Windows 10 has been out for almost a year now. It has been incredible for a developer like myself to be able to use Bash natively on a Windows machine!

In this article, I’ll show you how I install my main Bash setup for Windows 10.

 

Requirements

  1. Your Windows 10 PC must be running a 64-bit version of Windows 10 Anniversary Update build 14393 or later.
    To find your PC's CPU architecture and Windows version/build number, open Settings>System>About. Look for the System type and OS Build fields.


    In this screenshot, I have a 64-bit operating system, x64-based processor and OS Build, 15063.138, so I fit the requirements.

 

Steps

  1. Install Bash on Windows 10
  2. Install ConEmu for tabs
  3. Must have Bash customizations
  4. Install VcXsrv Windows X Server for opening GUI applications

 

1. Install Bash on Windows 10

In order to run Bash on Windows, you will need to manually:

  1. Turn on Developer Mode
  2. Enable the “Windows Subsystem for Linux (beta)” feature

Open Settings -> Update and Security -> For developers
Select the Developer Mode radio button.

Developer mode is selected.

From Start, search for “Turn Windows features on or off” (type ‘turn’)
Select Windows Subsystem for Linux (Beta)

Windows Subsystem for Linux (Beta) is checked.

Hit OK. Installation will proceed, and afterwards, you will have to restart your computer.

After you restart your computer, you will be able to finish installing Bash on Windows 10.

Search for Microsoft Store.

From the Microsoft Store, find Ubuntu and download and install it.

From Start, search for “bash” (type ‘bash’) or it might already be open.

When you open bash, you will see a command prompt window.

Type "y" to continue.

The real “Bash on Ubuntu on Windows” shortcut will be installed. Bash on Ubuntu on Windows might already be installed through the Microsoft Store.

Now, you can open “Bash on Ubuntu on Windows” whenever you search for “bash”

Try opening Bash.  The first time you install Bash on Windows, you will be prompted to create a UNIX username and password.

After typing in a UNIX user name and UNIX password, you can use Bash the same way that you would use a terminal on Mac and Linux.

The biggest problem though is there are no tabs! Let’s fix the tab issue.

 

2. Install ConEmu for tabs

ConEmu is an amazing program that gives you terminal tabs, allows you to copy and paste the normal way with CTRL-C and CTRL-V, and run any combinations of shells including Command Prompt, Bash, Powershell, and more.

https://conemu.github.io/

Hi the Download button, which will take you to a redirected list of versions of ConEmu. I like to use the Preview version.

Run the executable. Select the x64 bit version of installation.

Hit Next on the next few prompts, which are the intro window, license and agreement, and settings. I leave everything by default.

Now, you are ready to install. Hit Install.

Hit Finish on the next prompt.

From Start, search for “ConEmu” (type ‘ConEmu’)

When ConEmu first starts, you will be brought to the Startup Settings. You have to select the default console that you want to open.

Find and select {Bash::bash} in the Specified named task section.

Now, whenever you open ConEmu, it will open to Bash by default! ConEmu is easy to read and smooth.

I like to pin ConEmu to the taskbar to be able to open bash quickly. Right click ConEmu’s icon and click Pin to taskbar.

To add a new tab on ConEmu, type WIN+W.

To switch to the right tab, type CTRL+Tab.

To switch to the left tab, type CTRL+Shift+Tab.

All ConEmu’s shortcuts are listed: http://conemu.github.io/en/KeyboardShortcuts.html

 

3. Must have Bash customizations

Bash on Windows 10 is great, but it could use a few customizations to make using it with Windows 10 files and programs easier!

First, we will adjust our ~/.bashrc.

nano ~/.bashrc

Use any text editor. On nano, type ALT+/ to go to the end of the file.

These configurations allow easy access to some of my favorite Windows related directories and programs.

I want to be able to change directory to the Windows C: drive easily and access my desktop, so I use aliases.

alias converts the given word into shortcuts.

I also want to be able to use Sublime, which is my go-to GUI text editor, so that I can type subl . and open the current working directory with Sublime.

I am using Sublime 3https://www.sublimetext.com/3

I want to be able to open any folder with File Explorer with open, so that I can open the current working directory with open .

I have a shortcut called linux to open the Ubuntu’s root folder with File Explorer.

Lastly, I have an alias called reload for reloading the ~/.bashrc to apply any new configurations.

Replace huyle with the username of your computer.

# Custom shortcuts
alias windows="cd /mnt/c"
alias desktop="cd /mnt/c/Users/huyle/Desktop"
alias subl="/mnt/c/Program\ Files/Sublime\ Text\ 3/subl.exe"
alias open="/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe /c start -WorkingDirectory C:'\\'Users'\\'huyle'\\'AppData'\\'Local'\\'lxss"
alias linux="open C:/Users/huyle/AppData/Local/lxss"
alias reload="source ~/.bashrc"

These other shortcuts I use to access my favorite directories. I recommend you to add your favorite Windows or Ubuntu directories where you put your development code or work.

# Optional shortcuts
alias repos="cd /mnt/c/Users/huyle/Desktop/Repos"
alias work="cd /mnt/c/Users/huyle/Desktop/Work"
alias youtube="cd /mnt/c/Users/huyle/Desktop/YouTube"

You can save your file with nano by using CTRL+O and then pressing Enter.

Now, we can apply these changes.

source ~/.bashrc

Use the windows alias to easily switch to your Windows files! You can try some of these other aliases!

open .

The open alias does not work with Ubuntu’s directories because of directory translation errors, but by default, at least, I set the alias to open the Ubuntu root directory.

Every now and then, I prefer using Sublime, so it’s very convenient to be able to type subl . in order to open current working directories with Sublime.

Here are some extra utilities that I like to install on Bash. These utilities are optional.

I like to use tmux, which is a terminal multiplexer. It lets you switch easily between several programs in one terminal.

I like tabs, but every now and then, I like everything in one terminal for a bird’s eye view.

I also like to use zip and unzip often to create zip files and extract them.

sudo apt-get install -y tmux zip unzip

Nice! Bash on Windows 10 with tabs and tmux feels so good. Your development is now super-charged!

 

4. Install VcXsrv Windows X Server for opening GUI applications

If you have ever wanted to open GUI applications through SSH connections, this step is for you.

By default, Windows 10 does not come with an X11 server by default. I’ve been using VcXsrv Windows X Server, but Xming also works.

You can download VcXsrv Windows X Server here:

https://sourceforge.net/projects/vcxsrv

Hit the Download green button.

I leave the settings by default.

You can open VcXsrv by searching for “vcx” on Windows 10 search.

I Allow access for VcXsrv Public networks.

Now that we have our X11 server open, we should adjust our ~/.bashrc a little bit to make sure that the DISPLAY value will be correct.

vim ~/.bashrc
# X11 server display value
export DISPLAY=localhost:0.0

Let’s test if our X11 server works! I like to install x11-apps for testing.

x11-apps contains xclock, which is great for testing GUI applications and X11.

sudo apt-get install -y x11-apps

Now, let’s run xclock.

xclock

Last but not least, let’s make sure that X11 will work on top of SSH connections.

mkdir ~/.ssh
vim ~/.ssh/config
Host *
    ForwardAgent yes
    ForwardX11 yes

Now, save the ssh config file and change its permissions correctly.

chmod 600 ~/.ssh/config

Afterwards, you should be able to use -X with ssh in order to enable the forwarding of X11 connections to VcXsrv.

ssh -X [email protected]_address

Great job! Good luck with your development. I’ve been finding this setup very comfortable as a developer!

nba_py documentation with examples

nba_py collects nba statistics from stats.nba.com.

This page will provide documentation on the endpoints and example data that nba_py can get because nba stats api documentation is very minimal.

nba_py also does have documentation, but it’s more about the parameters of functions that you can do without examples of what return data you may get.

How to install nba_py

  1. Get pip
  2. git clone https://github.com/seemethere/nba_py
  3. cd nba_py
  4. sudo pip install .

After you install nba_py, you can use the library by including import nba_py like any other python library.

 

nba_py constants

nba_py uses a few constants for variables like CURRENT_SEASON and TEAMS.

You can find them all of these constants in the constants.py file:

https://github.com/seemethere/nba_py/blob/master/nba_py/constants.py

Using nba_py constants:

from nba_py.constants import CURRENT_SEASON
print(CURRENT_SEASON)
2016-17

Another example:

from nba_py import constants
print(constants.SeasonType.Regular)
Regular Season

 

nba_py endpoints and examples

I’m in the process of documenting every nba_py endpoint with an example.

game

For the following game related endpoints, you have to put from nba_py import game.

from nba_py import game – game.BoxscoreSummary() – endpoint: boxscoresummaryv2
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
range_type: "0" (constants.RangeType.Default),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

boxscore_summary.game_summary()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.game_summary())

[{
 u'LIVE_PERIOD': 4, 
 u'GAME_STATUS_ID': 3, 
 u'LIVE_PERIOD_TIME_BCAST': u'Q4 - ABC', 
 u'GAME_SEQUENCE': 2, 
 u'GAME_DATE_EST': u'2016-12-25T00:00:00', 
 u'GAME_STATUS_TEXT': u'Final', u'GAMECODE': u'20161225/GSWCLE', 
 u'LIVE_PC_TIME': u' ', 
 u'WH_STATUS': 1, 
 u'HOME_TEAM_ID': 1610612739, 
 u'VISITOR_TEAM_ID': 1610612744, 
 u'SEASON': u'2016', 
 u'GAME_ID': u'0021600457', 
 u'NATL_TV_BROADCASTER_ABBREVIATION': u'ABC'
}]

boxscore_summary.other_stats()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.other_stats())

[{
 u'LEAD_CHANGES': 5, 
 u'TOTAL_TURNOVERS': 12, 
 u'TEAM_REBOUNDS': 16, 
 u'PTS_FB': 3, 
 u'PTS_2ND_CHANCE': 17, 
 u'LEAGUE_ID': u'00', 
 u'TEAM_ABBREVIATION': u'CLE', 
 u'TIMES_TIED': 11, 
 u'TEAM_TURNOVERS': 0, 
 u'LARGEST_LEAD': 2, 
 u'TEAM_ID': 1610612739, 
 u'PTS_OFF_TO': 14, 
 u'PTS_PAINT': 44, 
 u'TEAM_CITY': u'Cleveland'
 }, 
 {
 u'LEAD_CHANGES': 4, 
 u'TOTAL_TURNOVERS': 20, 
 u'TEAM_REBOUNDS': 9, 
 u'PTS_FB': 16, 
 u'PTS_2ND_CHANCE': 8, 
 u'LEAGUE_ID': u'00', 
 u'TEAM_ABBREVIATION': u'GSW', 
 u'TIMES_TIED': 11, 
 u'TEAM_TURNOVERS': 1, 
 u'LARGEST_LEAD': 14, 
 u'TEAM_ID': 1610612744, 
 u'PTS_OFF_TO': 21, 
 u'PTS_PAINT': 50, 
 u'TEAM_CITY': u'Golden State'
}]

boxscore_summary.officials()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.officials())

[{
 u'FIRST_NAME': u'Mike', 
 u'LAST_NAME': u'Callahan', 
 u'OFFICIAL_ID': 1147, 
 u'JERSEY_NUM': u'24 '
 }, 
 {
 u'FIRST_NAME': u'Sean', 
 u'LAST_NAME': u'Corbin', 
 u'OFFICIAL_ID': 1151, 
 u'JERSEY_NUM': u'33 '
 }, 
 {
 u'FIRST_NAME': u'Matt', 
 u'LAST_NAME': u'Boland', 
 u'OFFICIAL_ID': 2005, 
 u'JERSEY_NUM': u'18 '
}]

boxscore_summary.inactive_players()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.inactive_players())

[{
 u'FIRST_NAME': u'Chris', 
 u'LAST_NAME': u'Andersen', 
 u'TEAM_ABBREVIATION': u'CLE', 
 u'TEAM_ID': 1610612739, 
 u'PLAYER_ID': 2365, 
 u'TEAM_NAME': u'Cavaliers', 
 u'JERSEY_NUM': u'00 ', 
 u'TEAM_CITY': u'Cleveland'
 },
 {u'FIRST_NAME': u'Mo', 
 u'LAST_NAME': u'Williams', 
 u'TEAM_ABBREVIATION': u'CLE', 
 u'TEAM_ID': 1610612739,
 u'PLAYER_ID': 2590, 
 u'TEAM_NAME': u'Cavaliers', 
 u'JERSEY_NUM': u'52 ', 
 u'TEAM_CITY': u'Cleveland'
 }, 
 {
 u'FIRST_NAME': u'Damian', 
 u'LAST_NAME': u'Jones', 
 u'TEAM_ABBREVIATION': u'GSW', 
 u'TEAM_ID': 1610612744, 
 u'PLAYER_ID': 1627745, 
 u'TEAM_NAME': u'Warriors', 
 u'JERSEY_NUM': u'15 ', 
 u'TEAM_CITY': u'Golden State'
 },
 {
 u'FIRST_NAME': u'James Michael', 
 u'LAST_NAME': u'McAdoo', 
 u'TEAM_ABBREVIATION': u'GSW', 
 u'TEAM_ID': 1610612744, 
 u'PLAYER_ID': 203949, 
 u'TEAM_NAME': u'Warriors', 
 u'JERSEY_NUM': u'20 ', 
 u'TEAM_CITY': u'Golden State'
}]

boxscore_summary.game_info()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.game_info())

[{
 u'GAME_DATE': u'SUNDAY, DECEMBER 25, 2016', 
 u'GAME_TIME': u'2:36', 
 u'ATTENDANCE': 20562
}]

boxscore_summary.line_score()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.line_score())

[{
 u'TEAM_CITY_NAME': u'Cleveland', 
 u'GAME_DATE_EST': u'2016-12-25T00:00:00', 
 u'PTS_OT10': 0, 
 u'TEAM_ID': 1610612739, 
 u'TEAM_WINS_LOSSES': u'23-6', 
 u'GAME_SEQUENCE': 2, 
 u'TEAM_ABBREVIATION': u'CLE', u'TEAM_NICKNAME': u'Cavaliers', 
 u'PTS_OT8': 0, 
 u'PTS_OT9': 0, 
 u'PTS_OT2': 0, 
 u'PTS_OT3': 0, 
 u'PTS_OT1': 0, 
 u'PTS_OT6': 0, 
 u'PTS_OT7': 0, 
 u'PTS_OT4': 0, 
 u'PTS_OT5': 0, 
 u'GAME_ID': u'0021600457', 
 u'PTS': 109, 
 u'PTS_QTR3': 28, 
 u'PTS_QTR2': 27, 
 u'PTS_QTR1': 25, 
 u'PTS_QTR4': 29
 }, 
 {
 u'TEAM_CITY_NAME': u'Golden State', 
 u'GAME_DATE_EST': u'2016-12-25T00:00:00', 
 u'PTS_OT10': 0, 
 u'TEAM_ID': 1610612744, 
 u'TEAM_WINS_LOSSES': u'27-5', 
 u'GAME_SEQUENCE': 2, 
 u'TEAM_ABBREVIATION': u'GSW', 
 u'TEAM_NICKNAME': u'Warriors', 
 u'PTS_OT8': 0, 
 u'PTS_OT9': 0, 
 u'PTS_OT2': 0, 
 u'PTS_OT3': 0, 
 u'PTS_OT1': 0, 
 u'PTS_OT6': 0, 
 u'PTS_OT7': 0, 
 u'PTS_OT4': 0, 
 u'PTS_OT5': 0, 
 u'GAME_ID': u'0021600457', 
 u'PTS': 108, 
 u'PTS_QTR3': 32, 
 u'PTS_QTR2': 28, 
 u'PTS_QTR1': 27, 
 u'PTS_QTR4': 21
}]

boxscore_summary.last_meeting()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.last_meeting())

[{
 u'LAST_GAME_VISITOR_TEAM_CITY1': u'GSW', 
 u'LAST_GAME_HOME_TEAM_ABBREVIATION': u'CLE', 
 u'LAST_GAME_ID': u'0041500407', 
 u'LAST_GAME_VISITOR_TEAM_ID': 1610612744, 
 u'LAST_GAME_HOME_TEAM_POINTS': 93, 
 u'LAST_GAME_HOME_TEAM_CITY': u'Cleveland', 
 u'LAST_GAME_DATE_EST': u'2016-06-19T00:00:00', 
 u'LAST_GAME_VISITOR_TEAM_NAME': u'Warriors', 
 u'LAST_GAME_HOME_TEAM_NAME': u'Cavaliers', 
 u'LAST_GAME_VISITOR_TEAM_POINTS': 89, 
 u'GAME_ID': u'0021600457', 
 u'LAST_GAME_HOME_TEAM_ID': 1610612739, 
 u'LAST_GAME_VISITOR_TEAM_CITY': u'Golden State'
}]

boxscore_summary.season_series()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.season_series())

[{
 u'SERIES_LEADER': u'Cleveland', 
 u'HOME_TEAM_ID': 1610612739, 
 u'GAME_DATE_EST': u'2016-12-25T00:00:00', 
 u'HOME_TEAM_WINS': 1, 
 u'VISITOR_TEAM_ID': 1610612744, 
 u'GAME_ID': u'0021600457', 
 u'HOME_TEAM_LOSSES': 0
}]

boxscore_summary.available_video()

boxscore_summary = game.BoxscoreSummary("0021600457")
print(boxscore_summary.available_video())

[{
 u'PT_AVAILABLE': 1, 
 u'PT_XYZ_AVAILABLE': 1, 
 u'WH_STATUS': 1, 
 u'GAME_ID': u'0021600457', 
 u'VIDEO_AVAILABLE_FLAG': 1, 
 u'HUSTLE_STATUS': 1
}]
from nba_py import game – game.Boxscore() – endpoint: boxscoretraditionalv2
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
range_type: "0" (constants.RangeType.Default),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

boxscore.player_stats()

boxscore = game.Boxscore("0021600457")
print(boxscore.player_stats())

[{
 u'TO': 0,
 u'MIN': u'38:10', 
 u'PLAYER_ID': 201142, 
 u'TEAM_ID': 1610612744, 
 u'REB': 15, 
 u'COMMENT': u'', 
 u'FG3A': 8, 
 u'PLAYER_NAME': u'Kevin Durant', 
 u'AST': 3, 
 u'TEAM_ABBREVIATION': u'GSW', 
 u'FG3M': 2, 
 u'OREB': 0, 
 u'FGM': 11, 
 u'START_POSITION': u'F', 
 u'PF': 2, 
 u'PTS': 36, 
 u'FGA': 23, 
 u'PLUS_MINUS': 0.0, 
 u'STL': 1, 
 u'FTA': 12, 
 u'BLK': 1, 
 u'GAME_ID': u'0021600457', 
 u'DREB': 15, 
 u'FTM': 12, 
 u'FT_PCT': 1.0, 
 u'FG_PCT': 0.478, 
 u'FG3_PCT': 0.25, 
 u'TEAM_CITY': u'Golden State'
 },...
 {
 u'TO': None,
 u'MIN': None,
 u'PLAYER_ID': 2747,
 u'TEAM_ID': 1610612739,
 u'REB': None,
 u'COMMENT': u'DND - Right Thumb Fracture ',
 u'FG3A': None,
 u'PLAYER_NAME': u'JR Smith',
 u'AST': None,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': None,
 u'OREB': None,
 u'FGM': None,
 u'START_POSITION': u'',
 u'PF': None,
 u'PTS': None,
 u'FGA': None,
 u'PLUS_MINUS': None,
 u'STL': None,
 u'FTA': None,
 u'BLK': None,
 u'GAME_ID': u'0021600457',
 u'DREB': None,
 u'FTM': None,
 u'FT_PCT': None,
 u'FG_PCT': None,
 u'FG3_PCT': None,
 u'TEAM_CITY': u'Cleveland'
}]

boxscore.team_stats()

boxscore = game.Boxscore("0021600457")
print(boxscore.team_stats())
[{
 u'TO': 19,
 u'MIN': u'240:00',
 u'TEAM_ID': 1610612744,
 u'REB': 42,
 u'TEAM_NAME': u'Warriors',
 u'FG3A': 30,
 u'AST': 25,
 u'TEAM_ABBREVIATION': u'GSW',
 u'FG3M': 9,
 u'OREB': 5,
 u'FGM': 37,
 u'PF': 24,
 u'PTS': 108,
 u'FGA': 77,
 u'PLUS_MINUS': -1.0,
 u'STL': 8,
 u'FTA': 29,
 u'BLK': 4,
 u'GAME_ID': u'0021600457',
 u'DREB': 37,
 u'FTM': 25,
 u'FT_PCT': 0.862,
 u'FG_PCT': 0.481,
 u'FG3_PCT': 0.3,
 u'TEAM_CITY': u'Golden State'
 },
 {
 u'TO': 12,
 u'MIN': u'240:00',
 u'TEAM_ID': 1610612739,
 u'REB': 44,
 u'TEAM_NAME': u'Cavaliers',
 u'FG3A': 35,
 u'AST': 20,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': 12,
 u'OREB': 18,
 u'FGM': 37,
 u'PF': 19,
 u'PTS': 109,
 u'FGA': 95,
 u'PLUS_MINUS': 1.0,
 u'STL': 14,
 u'FTA': 32,
 u'BLK': 2,
 u'GAME_ID': u'0021600457',
 u'DREB': 26,
 u'FTM': 23,
 u'FT_PCT': 0.719,
 u'FG_PCT': 0.389,
 u'FG3_PCT': 0.343,
 u'TEAM_CITY': u'Cleveland'
}]

boxscore.team_starter_bench_stats()

boxscore = game.Boxscore("0021600457")
print(boxscore.team_starter_bench_stats())

[{
 u'TO': 14,
 u'MIN': u'160:43',
 u'STARTERS_BENCH': u'Starters',
 u'TEAM_ID': 1610612744,
 u'REB': 29,
 u'TEAM_NAME': u'Warriors',
 u'FG3A': 28,
 u'AST': 12,
 u'TEAM_ABBREVIATION': u'GSW',
 u'FG3M': 9,
 u'OREB': 1,
 u'FGM': 33,
 u'PF': 16,
 u'PTS': 95,
 u'FGA': 62,
 u'STL': 6,
 u'FTA': 22,
 u'BLK': 2,
 u'GAME_ID': u'0021600457',
 u'DREB': 28,
 u'FTM': 20,
 u'FT_PCT': 0.909,
 u'FG_PCT': 0.532,
 u'FG3_PCT': 0.321,
 u'TEAM_CITY': u'Golden State'
 },
 {
 u'TO': 4,
 u'MIN': u'56:41',
 u'STARTERS_BENCH': u'Bench',
 u'TEAM_ID': 1610612744,
 u'REB': 9,
 u'TEAM_NAME': u'Warriors',
 u'FG3A': 2,
 u'AST': 12,
 u'TEAM_ABBREVIATION': u'GSW',
 u'FG3M': 0,
 u'OREB': 2,
 u'FGM': 1,
 u'PF': 5,
 u'PTS': 7,
 u'FGA': 9,
 u'STL': 1,
 u'FTA': 5,
 u'BLK': 2,
 u'GAME_ID': u'0021600457',
 u'DREB': 7,
 u'FTM': 5,
 u'FT_PCT': 1.0,
 u'FG_PCT': 0.111,
 u'FG3_PCT': 0.0,
 u'TEAM_CITY': u'Golden State'
 },
 {
 u'TO': 7,
 u'MIN': u'165:46',
 u'STARTERS_BENCH': u'Starters',
 u'TEAM_ID': 1610612739,
 u'REB': 35,
 u'TEAM_NAME': u'Cavaliers',
 u'FG3A': 20,
 u'AST': 18,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': 9,
 u'OREB': 15,
 u'FGM': 30,
 u'PF': 11,
 u'PTS': 84,
 u'FGA': 68,
 u'STL': 13,
 u'FTA': 24,
 u'BLK': 1,
 u'GAME_ID': u'0021600457',
 u'DREB': 20,
 u'FTM': 15,
 u'FT_PCT': 0.625,
 u'FG_PCT': 0.441,
 u'FG3_PCT': 0.45,
 u'TEAM_CITY': u'Cleveland'
 },
 {
 u'TO': 5,
 u'MIN': u'74:15',
 u'STARTERS_BENCH': u'Bench',
 u'TEAM_ID': 1610612739,
 u'REB': 9,
 u'TEAM_NAME': u'Cavaliers',
 u'FG3A': 15,
 u'AST': 2,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': 3,
 u'OREB': 3,
 u'FGM': 7,
 u'PF': 8,
 u'PTS': 25,
 u'FGA': 27,
 u'STL': 1,
 u'FTA': 8,
 u'BLK': 1,
 u'GAME_ID': u'0021600457',
 u'DREB': 6,
 u'FTM': 8,
 u'FT_PCT': 1.0,
 u'FG_PCT': 0.259,
 u'FG3_PCT': 0.2,
 u'TEAM_CITY': u'Cleveland'
}]
from nba_py import game – game.BoxscoreScoring() – endpoint: boxscorescoringv2
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
range_type: "0" (constants.RangeType.Default),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

boxscore_scoring.sql_players_scoring()

boxscore_scoring = game.BoxscoreScoring("0021600457")
print(boxscore_scoring.sql_players_scoring())

[{
 u'PCT_AST_FGM': 0.273,
 u'MIN': u'38:10',
 u'TEAM_ID': 1610612744,
 u'PCT_PTS_2PT_MR': 0.111,
 u'GAME_ID': u'0021600457',
 u'PLAYER_ID': 201142,
 u'COMMENT': u'',
 u'PLAYER_NAME': u'Kevin Durant',
 u'TEAM_ABBREVIATION': u'GSW',
 u'PCT_AST_2PM': 0.222,
 u'START_POSITION': u'F',
 u'PCT_PTS_PAINT': 0.389,
 u'PCT_UAST_2PM': 0.778,
 u'PCT_PTS_2PT': 0.5,
 u'PCT_UAST_3PM': 0.5,
 u'PCT_AST_3PM': 0.5,
 u'PCT_PTS_OFF_TOV': 0.167,
 u'PCT_PTS_FB': 0.25,
 u'PCT_UAST_FGM': 0.727,
 u'PCT_FGA_2PT': 0.652,
 u'PCT_PTS_FT': 0.333,
 u'PCT_PTS_3PT': 0.167,
 u'PCT_FGA_3PT': 0.348,
 u'TEAM_CITY': u'Golden State'
 },...
 {
 u'PCT_AST_FGM': None,
 u'MIN': None,
 u'TEAM_ID': 1610612739,
 u'PCT_PTS_2PT_MR': None,
 u'GAME_ID': u'0021600457',
 u'PLAYER_ID': 2747,
 u'COMMENT': u'DND - Right Thumb Fracture ',
 u'PLAYER_NAME': u'JR Smith',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PCT_AST_2PM': None,
 u'START_POSITION': u'',
 u'PCT_PTS_PAINT': None,
 u'PCT_UAST_2PM': None,
 u'PCT_PTS_2PT': None,
 u'PCT_UAST_3PM': None,
 u'PCT_AST_3PM': None,
 u'PCT_PTS_OFF_TOV': None,
 u'PCT_PTS_FB': None,
 u'PCT_UAST_FGM': None,
 u'PCT_FGA_2PT': None,
 u'PCT_PTS_FT': None,
 u'PCT_PTS_3PT': None,
 u'PCT_FGA_3PT': None,
 u'TEAM_CITY': u'Cleveland'
}]

boxscore_scoring.sql_team_scoring()

boxscore_scoring = game.BoxscoreScoring("0021600457")
print(boxscore_scoring.sql_team_scoring())

[{
 u'PCT_PTS_FB': 0.148,
 u'PCT_AST_FGM': 0.676,
 u'PCT_PTS_2PT': 0.519,
 u'PCT_AST_3PM': 0.889,
 u'MIN': u'240:00',
 u'PCT_UAST_2PM': 0.393,
 u'PCT_UAST_FGM': 0.324,
 u'TEAM_ABBREVIATION': u'GSW',
 u'PCT_UAST_3PM': 0.111,
 u'PCT_FGA_2PT': 0.61,
 u'PCT_PTS_PAINT': 0.463,
 u'PCT_AST_2PM': 0.607,
 u'TEAM_ID': 1610612744,
 u'PCT_PTS_2PT_MR': 0.056,
 u'PCT_PTS_FT': 0.231,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Warriors',
 u'PCT_FGA_3PT': 0.39,
 u'PCT_PTS_OFF_TOV': 0.13,
 u'PCT_PTS_3PT': 0.25,
 u'TEAM_CITY': u'Golden State'
 },
 {
 u'PCT_PTS_FB': 0.028,
 u'PCT_AST_FGM': 0.541,
 u'PCT_PTS_2PT': 0.459,
 u'PCT_AST_3PM': 0.75,
 u'MIN': u'240:00',
 u'PCT_UAST_2PM': 0.56,
 u'PCT_UAST_FGM': 0.459,
 u'TEAM_ABBREVIATION': u'CLE',
 u'PCT_UAST_3PM': 0.25,
 u'PCT_FGA_2PT': 0.632,
 u'PCT_PTS_PAINT': 0.404,
 u'PCT_AST_2PM': 0.44,
 u'TEAM_ID': 1610612739,
 u'PCT_PTS_2PT_MR': 0.055,
 u'PCT_PTS_FT': 0.211,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Cavaliers',
 u'PCT_FGA_3PT': 0.368,
 u'PCT_PTS_OFF_TOV': 0.193,
 u'PCT_PTS_3PT': 0.33,
 u'TEAM_CITY': u'Cleveland'
}]
from nba_py import game – game.BoxscoreUsage() – endpoint: boxscoreusagev2
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
range_type: "0" (constants.RangeType.Default),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

boxscore_usage.sql_players_usage()

boxscore_usage = game.BoxscoreUsage("0021600457")
print(boxscore_usage.sql_players_usage())
[{
 u'TEAM_ABBREVIATION': u'GSW',
 u'PCT_REB': 0.429,
 u'MIN': u'38:10',
 u'PCT_FTM': 0.6,
 u'TEAM_ID': 1610612744,
 u'GAME_ID': u'0021600457',
 u'PLAYER_ID': 201142,
 u'PCT_OREB': 0.0,
 u'PCT_FTA': 0.5,
 u'PCT_BLK': 0.5,
 u'PCT_DREB': 0.469,
 u'COMMENT': u'',
 u'PCT_FGA': 0.371,
 u'PLAYER_NAME': u'Kevin Durant',
 u'PCT_PF': 0.1,
 u'PCT_AST': 0.176,
 u'PCT_FGM': 0.379,
 u'START_POSITION': u'F',
 u'PCT_FG3A': 0.333,
 u'PCT_FG3M': 0.333,
 u'PCT_TOV': 0.0,
 u'PCT_PFD': 0.438,
 u'USG_PCT': 0.327,
 u'PCT_STL': 0.2,
 u'PCT_BLKA': 0.0,
 u'PCT_PTS': 0.429,
 u'TEAM_CITY': u'Golden State'
 },...
 {
 u'TEAM_ABBREVIATION': u'CLE',
 u'PCT_REB': None,
 u'MIN': None,
 u'PCT_FTM': None,
 u'TEAM_ID': 1610612739,
 u'GAME_ID': u'0021600457',
 u'PLAYER_ID': 2747,
 u'PCT_OREB': None,
 u'PCT_FTA': None,
 u'PCT_BLK': None,
 u'PCT_DREB': None,
 u'COMMENT': u'DND - Right Thumb Fracture ',
 u'PCT_FGA': None,
 u'PLAYER_NAME': u'JR Smith',
 u'PCT_PF': None,
 u'PCT_AST': None,
 u'PCT_FGM': None,
 u'START_POSITION': u'',
 u'PCT_FG3A': None,
 u'PCT_FG3M': None,
 u'PCT_TOV': None,
 u'PCT_PFD': None,
 u'USG_PCT': 0.0,
 u'PCT_STL': None,
 u'PCT_BLKA': None,
 u'PCT_PTS': None,
 u'TEAM_CITY': u'Cleveland'
}]

boxscore_usage.sql_team_usage()

boxscore_usage = game.BoxscoreUsage("0021600457")
print(boxscore_usage.sql_team_usage())

[{
 u'TEAM_ABBREVIATION': u'GSW',
 u'PCT_REB': 1,
 u'MIN': u'240:00',
 u'PCT_FTM': 1,
 u'TEAM_ID': 1610612744,
 u'PCT_BLK': 1,
 u'PCT_FTA': 1,
 u'TEAM_NAME': u'Warriors',
 u'PCT_DREB': 1,
 u'PCT_TOV': 1,
 u'PCT_FGA': 1,
 u'PCT_STL': 1,
 u'PCT_PF': 1,
 u'PCT_AST': 1,
 u'PCT_FGM': 1,
 u'PCT_FG3A': 1,
 u'PCT_FG3M': 1,
 u'PCT_PFD': 1,
 u'USG_PCT': 1,
 u'PCT_OREB': 1,
 u'GAME_ID': u'0021600457',
 u'PCT_BLKA': 1,
 u'PCT_PTS': 1,
 u'TEAM_CITY': u'Golden State'
 },
 {
 u'TEAM_ABBREVIATION': u'CLE',
 u'PCT_REB': 1,
 u'MIN': u'240:00',
 u'PCT_FTM': 1,
 u'TEAM_ID': 1610612739,
 u'PCT_BLK': 1,
 u'PCT_FTA': 1,
 u'TEAM_NAME': u'Cavaliers',
 u'PCT_DREB': 1,
 u'PCT_TOV': 1,
 u'PCT_FGA': 1,
 u'PCT_STL': 1,
 u'PCT_PF': 1,
 u'PCT_AST': 1,
 u'PCT_FGM': 1,
 u'PCT_FG3A': 1,
 u'PCT_FG3M': 1,
 u'PCT_PFD': 1,
 u'USG_PCT': 1,
 u'PCT_OREB': 1,
 u'GAME_ID': u'0021600457',
 u'PCT_BLKA': 1,
 u'PCT_PTS': 1,
 u'TEAM_CITY': u'Cleveland'
}]
from nba_py import game – game.BoxscoreMisc() – endpoint: boxscoremiscv2
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
range_type: "0" (constants.RangeType.Default),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

boxscore_misc.sql_players_misc()

boxscore_misc = game.BoxscoreMisc("0021600457")
print(boxscore_misc.sql_players_misc())

[{
 u'COMMENT': u'',
 u'PTS_OFF_TOV': 6,
 u'PF': 2,
 u'PLAYER_NAME': u'Kevin Durant',
 u'OPP_PTS_FB': 3,
 u'MIN': u'38:10',
 u'OPP_PTS_2ND_CHANCE': 11,
 u'TEAM_ABBREVIATION': u'GSW',
 u'PTS_PAINT': 14,
 u'TEAM_ID': 1610612744,
 u'START_POSITION': u'F',
 u'BLK': 1,
 u'OPP_PTS_OFF_TOV': 15,
 u'PTS_FB': 9,
 u'PLAYER_ID': 201142,
 u'GAME_ID': u'0021600457',
 u'BLKA': 0,
 u'PTS_2ND_CHANCE': 0,
 u'OPP_PTS_PAINT': 30,
 u'TEAM_CITY': u'Golden State',
 u'PFD': 7
 },...
 {
 u'COMMENT': u'DND - Right Thumb Fracture ',
 u'PTS_OFF_TOV': None,
 u'PF': None,
 u'PLAYER_NAME': u'JR Smith',
 u'OPP_PTS_FB': None,
 u'MIN': None,
 u'OPP_PTS_2ND_CHANCE': None,
 u'TEAM_ABBREVIATION': u'CLE',
 u'PTS_PAINT': None,
 u'TEAM_ID': 1610612739,
 u'START_POSITION': u'',
 u'BLK': None,
 u'OPP_PTS_OFF_TOV': None,
 u'PTS_FB': None,
 u'PLAYER_ID': 2747,
 u'GAME_ID': u'0021600457',
 u'BLKA': None,
 u'PTS_2ND_CHANCE': None,
 u'OPP_PTS_PAINT': None,
 u'TEAM_CITY': u'Cleveland',
 u'PFD': None
}]

boxscore_misc.sql_team_usage()

boxscore_usage = game.BoxscoreUsage("0021600457")
print(boxscore_usage.sql_team_usage())

[{
 u'PTS_OFF_TOV': 14.0,
 u'BLKA': 2,
 u'PTS_FB': 16.0,
 u'OPP_PTS_FB': 3.0,
 u'MIN': u'240:00',
 u'OPP_PTS_2ND_CHANCE': 17.0,
 u'TEAM_ABBREVIATION': u'GSW',
 u'TEAM_ID': 1610612744,
 u'PF': 24,
 u'BLK': 4,
 u'OPP_PTS_OFF_TOV': 21.0,
 u'PTS_PAINT': 50.0,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Warriors',
 u'PTS_2ND_CHANCE': 8.0,
 u'OPP_PTS_PAINT': 44.0,
 u'TEAM_CITY': u'Golden State',
 u'PFD': 19
 },
 {
 u'PTS_OFF_TOV': 21.0,
 u'BLKA': 4,
 u'PTS_FB': 3.0,
 u'OPP_PTS_FB': 16.0,
 u'MIN': u'240:00',
 u'OPP_PTS_2ND_CHANCE': 8.0,
 u'TEAM_ABBREVIATION': u'CLE',
 u'TEAM_ID': 1610612739,
 u'PF': 19,
 u'BLK': 2,
 u'OPP_PTS_OFF_TOV': 14.0,
 u'PTS_PAINT': 44.0,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Cavaliers',
 u'PTS_2ND_CHANCE': 17.0,
 u'OPP_PTS_PAINT': 50.0,
 u'TEAM_CITY': u'Cleveland',
 u'PFD': 24
}]
from nba_py import game – game.BoxscoreAdvanced() – endpoint: boxscoreadvancedv2
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
range_type: "0" (constants.RangeType.Default),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

boxscore_advanced.sql_players_advanced()

boxscore_advanced = game.BoxscoreAdvanced("0021600457")
print(boxscore_advanced.sql_players_advanced())

[{
 u'MIN': u'38:10',
 u'TEAM_ID': 1610612744,
 u'PLAYER_ID': 201142,
 u'AST_PCT': 0.167,
 u'COMMENT': u'',
 u'EFG_PCT': 0.522,
 u'PLAYER_NAME': u'Kevin Durant',
 u'DEF_RATING': 99.8,
 u'NET_RATING': 0.8,
 u'TEAM_ABBREVIATION': u'GSW',
 u'PIE': 0.328,
 u'START_POSITION': u'F',
 u'TM_TOV_PCT': 0.0,
 u'TS_PCT': 0.636,
 u'USG_PCT': 0.327,
 u'OREB_PCT': 0.0,
 u'REB_PCT': 0.217,
 u'GAME_ID': u'0021600457',
 u'DREB_PCT': 0.341,
 u'PACE': 105.49,
 u'AST_TOV': 0.0,
 u'AST_RATIO': 9.6,
 u'TEAM_CITY': u'Golden State',
 u'OFF_RATING': 100.5
 },...
 {
 u'MIN': None,
 u'TEAM_ID': 1610612739,
 u'PLAYER_ID': 2747,
 u'AST_PCT': None,
 u'COMMENT': u'DND - Right Thumb Fracture ',
 u'EFG_PCT': None,
 u'PLAYER_NAME': u'JR Smith',
 u'DEF_RATING': None,
 u'NET_RATING': None,
 u'TEAM_ABBREVIATION': u'CLE',
 u'PIE': None,
 u'START_POSITION': u'',
 u'TM_TOV_PCT': None,
 u'TS_PCT': None,
 u'USG_PCT': 0.0,
 u'OREB_PCT': None,
 u'REB_PCT': None,
 u'GAME_ID': u'0021600457',
 u'DREB_PCT': None,
 u'PACE': None,
 u'AST_TOV': None,
 u'AST_RATIO': 0.0,
 u'TEAM_CITY': u'Cleveland',
 u'OFF_RATING': None
}]

boxscore_advanced.sql_team_advanced()

boxscore_advanced = game.BoxscoreAdvanced("0021600457")
print(boxscore_advanced.sql_team_advanced())

[{ 
 u'TS_PCT': 0.602,
 u'EFG_PCT': 0.539,
 u'DEF_RATING': 105.7,
 u'MIN': u'240:00',
 u'NET_RATING': -2.7,
 u'TEAM_ABBREVIATION': u'GSW',
 u'USG_PCT': 0.198,
 u'OREB_PCT': 0.161,
 u'AST_RATIO': 18.6,
 u'PACE': 103.92,
 u'TEAM_ID': 1610612744,
 u'PIE': 0.538,
 u'REB_PCT': 0.488,
 u'DREB_PCT': 0.673,
 u'AST_TOV': 1.25,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Warriors',
 u'AST_PCT': 0.676,
 u'TM_TOV_PCT': 19.091,
 u'TEAM_CITY': u'Golden State',
 u'OFF_RATING': 103.1
 },
 {
 u'TS_PCT': 0.5,
 u'EFG_PCT': 0.453,
 u'DEF_RATING': 103.1,
 u'MIN': u'240:00',
 u'NET_RATING': 2.7,
 u'TEAM_ABBREVIATION': u'CLE',
 u'USG_PCT': 0.2,
 u'OREB_PCT': 0.327,
 u'AST_RATIO': 14.2,
 u'PACE': 103.92,
 u'TEAM_ID': 1610612739,
 u'PIE': 0.462,
 u'REB_PCT': 0.512,
 u'DREB_PCT': 0.839,
 u'AST_TOV': 1.67,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Cavaliers',
 u'AST_PCT': 0.541,
 u'TM_TOV_PCT': 11.641,
 u'TEAM_CITY': u'Cleveland',
 u'OFF_RATING': 105.7
}]
from nba_py import game – game.BoxscoreFourFactors() – endpoint: boxscorefourfactorsv2
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
range_type: "0" (constants.RangeType.Default),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

boxscore_four_factors.sql_players_four_factors()

boxscore_four_factors = game.BoxscoreFourFactors("0021600457")
print(boxscore_four_factors.sql_players_four_factors())

[{
 u'COMMENT': u'',
 u'EFG_PCT': 0.516,
 u'PLAYER_NAME': u'Kevin Durant',
 u'MIN': u'38:10',
 u'FTA_RATE': 0.387,
 u'TM_TOV_PCT': 0.168,
 u'TEAM_ABBREVIATION': u'GSW',
 u'OREB_PCT': 0.12,
 u'OPP_OREB_PCT': 0.273,
 u'TEAM_ID': 1610612744,
 u'START_POSITION': u'F',
 u'OPP_TOV_PCT': 0.107,
 u'OPP_EFG_PCT': 0.426,
 u'PLAYER_ID': 201142,
 u'GAME_ID': u'0021600457',
 u'OPP_FTA_RATE': 0.405,
 u'TEAM_CITY': u'Golden State'
 },...
 {
 u'COMMENT': u'DND - Right Thumb Fracture ',
 u'EFG_PCT': None,
 u'PLAYER_NAME': u'JR Smith',
 u'MIN': None,
 u'FTA_RATE': None,
 u'TM_TOV_PCT': None,
 u'TEAM_ABBREVIATION': u'CLE',
 u'OREB_PCT': None,
 u'OPP_OREB_PCT': None,
 u'TEAM_ID': 1610612739,
 u'START_POSITION': u'',
 u'OPP_TOV_PCT': None,
 u'OPP_EFG_PCT': None,
 u'PLAYER_ID': 2747,
 u'GAME_ID': u'0021600457',
 u'OPP_FTA_RATE': None,
 u'TEAM_CITY': u'Cleveland'
}]

boxscore_four_factors.sql_team_four_factors()

boxscore_four_factors = game.BoxscoreFourFactors("0021600457")
print(boxscore_four_factors.sql_team_four_factors())

[{
 u'EFG_PCT': 0.539,
 u'OPP_OREB_PCT': 0.327,
 u'MIN': u'240:00',
 u'FTA_RATE': 0.377,
 u'TM_TOV_PCT': 0.191,
 u'TEAM_ABBREVIATION': u'GSW',
 u'OREB_PCT': 0.161,
 u'TEAM_ID': 1610612744,
 u'OPP_TOV_PCT': 0.116,
 u'OPP_EFG_PCT': 0.453,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Warriors',
 u'OPP_FTA_RATE': 0.337,
 u'TEAM_CITY': u'Golden State'
 },
 {
 u'EFG_PCT': 0.453,
 u'OPP_OREB_PCT': 0.161,
 u'MIN': u'240:00',
 u'FTA_RATE': 0.337,
 u'TM_TOV_PCT': 0.116,
 u'TEAM_ABBREVIATION': u'CLE',
 u'OREB_PCT': 0.327,
 u'TEAM_ID': 1610612739,
 u'OPP_TOV_PCT': 0.191,
 u'OPP_EFG_PCT': 0.539,
 u'GAME_ID': u'0021600457',
 u'TEAM_NAME': u'Cavaliers',
 u'OPP_FTA_RATE': 0.377,
 u'TEAM_CITY': u'Cleveland'
}]
from nba_py import game – game.PlayerTracking() – endpoint: boxscoreplayertrackv2
game_id: "0021600457" (required)
("0021600457")

player_tracking.info()

player_tracking = game.PlayerTracking("0021600457")
print(player_tracking.info())

[{
 u'UFGA': 10,
 u'DFGM': 7,
 u'DIST': 2.43,
 u'DFG_PCT': 0.636,
 u'MIN': u'38:10',
 u'TCHS': 73,
 u'UFGM': 4,
 u'DFGA': 11,
 u'DRBC': 20,
 u'TEAM_ID': 1610612744,
 u'UFG_PCT': 0.4,
 u'PLAYER_ID': 201142,
 u'CFG_PCT': 0.538,
 u'COMMENT': u'',
 u'SAST': 2,
 u'PLAYER_NAME': u'Kevin Durant',
 u'AST': 3,
 u'TEAM_ABBREVIATION': u'GSW',
 u'START_POSITION': u'F',
 u'SPD': 3.81,
 u'PASS': 41,
 u'GAME_ID': u'0021600457',
 u'RBC': 21,
 u'FG_PCT': 0.478,
 u'FTAST': 1,
 u'CFGM': 7,
 u'ORBC': 1,
 u'CFGA': 13,
 u'TEAM_CITY': u'Golden State'
 },...
 {
 u'UFGA': 0,
 u'DFGM': 0,
 u'DIST': 0.0,
 u'DFG_PCT': 0.0,
 u'MIN': u'0:00',
 u'TCHS': 0,
 u'UFGM': 0,
 u'DFGA': 0,
 u'DRBC': 0,
 u'TEAM_ID': 1610612739,
 u'UFG_PCT': 0.0,
 u'PLAYER_ID': 2747,
 u'CFG_PCT': 0.0,
 u'COMMENT': u'DND - Right Thumb Fracture ',
 u'SAST': 0,
 u'PLAYER_NAME': u'JR Smith',
 u'AST': 0,
 u'TEAM_ABBREVIATION': u'CLE',
 u'START_POSITION': u'',
 u'SPD': 0.0,
 u'PASS': 0,
 u'GAME_ID': u'0021600457',
 u'RBC': 0,
 u'FG_PCT': 0.0,
 u'FTAST': 0,
 u'CFGM': 0,
 u'ORBC': 0,
 u'CFGA': 0,
 u'TEAM_CITY': u'Cleveland'
}]
from nba_py import game – game.PlayByPlay() – endpoint: playbyplay
game_id: "0021600457" (required),
season: "2016-17" (constants.CURRENT_SEASON),
start_period: "0" (constants.StartPeriod.Default),
end_period: "0" (constants.EndPeriod.Default),
start_range: "0" (constants.StartRange.Default),
end_range: "0" (constants.EndRange.Default)
("0021600457", season="2016-17", season_type="Regular Season", range_type="0", start_period="0", end_period="0", start_range="0", end_range="0")

play_by_play.info()

play_by_play = game.PlayByPlay("0021600457")
print(play_by_play.info())

[{
 u'VISITORDESCRIPTION': None,
 u'SCOREMARGIN': None,
 u'PERIOD': 1,
 u'SCORE': None,
 u'EVENTNUM': 0,
 u'NEUTRALDESCRIPTION': None,
 u'EVENTMSGACTIONTYPE': 0,
 u'HOMEDESCRIPTION': None,
 u'EVENTMSGTYPE': 12,
 u'GAME_ID': u'0021600457',
 u'WCTIMESTRING': u'2:39 PM',
 u'PCTIMESTRING': u'12:00'
 },...
 {
 u'VISITORDESCRIPTION': None,
 u'SCOREMARGIN': u'1',
 u'PERIOD': 4,
 u'SCORE': u'108 - 109',
 u'EVENTNUM': 607,
 u'NEUTRALDESCRIPTION': None,
 u'EVENTMSGACTIONTYPE': 0,
 u'HOMEDESCRIPTION': None,
 u'EVENTMSGTYPE': 13,
 u'GAME_ID': u'0021600457',
 u'WCTIMESTRING': u'5:15 PM',
 u'PCTIMESTRING': u'0:00'
}]

play_by_play.available_video()

play_by_play = game.PlayByPlay("0021600457")
print(play_by_play.available_video())

[{
 u'VIDEO_AVAILABLE_FLAG': 1
}]

 

player

For the following player related endpoints, you have to put from nba_py import player.

from nba_py import player – player.get_player()

get_player() gets a player’s player ID.

first_name: "Nene" (required),
last_name: "" (not required),
season: "2016-17" (constants.CURRENT_SEASON),
only_current: "0" (default),
just_id: True (default)

Example 1: First Name only

get_player = player.get_player("Nene")
print(get_player)

2403

Example 2: First Name – 1 word – Last Name – 1 word

first_name: "Lebron" (required),
last_name: "James" (not required),
season: "2016-17" (constants.CURRENT_SEASON),
only_current: "0" (default),
just_id: True (default)
get_player = player.get_player("Lebron", last_name="James")
print(get_player)

2544

Example 3: First Name – 1 word – Last Name – 2 words

first_name: "Metta" (required),
last_name: "World Peace" (not required),
season: "2016-17" (constants.CURRENT_SEASON),
only_current: "0" (default),
just_id: True (default)
get_player = player.get_player("Metta", last_name="World Peace")
print(get_player)

1897
from nba_py import player – player.PlayerList() – endpoint: commonallplayers
league_id: "" (required),
season: "2016-17" (constants.CURRENT_SEASON),
only_current: "1" (default)
from nba_py import player – player.PlayerSummary() – endpoint: commonplayerinfo
player_id: "2544" (required)

player_summary.info()

player_summary = player.PlayerSummary("2544")
print(player_summary.info())

[{
 u'FIRST_NAME': u'LeBron',
 u'LAST_NAME': u'James',
 u'GAMES_PLAYED_FLAG': u'Y',
 u'COUNTRY': u'USA',
 u'BIRTHDATE': u'1984-12-30T00:00:00',
 u'TEAM_ID': 1610612739,
 u'TEAM_NAME': u'Cavaliers',
 u'ROSTERSTATUS': u'Active',
 u'TEAM_ABBREVIATION': u'CLE',
 u'DISPLAY_FI_LAST': u'L. James',
 u'PLAYERCODE': u'lebron_james',
 u'DLEAGUE_FLAG': u'N',
 u'POSITION': u'Forward',
 u'FROM_YEAR': 2003,
 u'WEIGHT': u'250',
 u'DISPLAY_FIRST_LAST': u'LeBron James',
 u'HEIGHT': u'6-8',
 u'DRAFT_ROUND': u'1',
 u'TO_YEAR': 2016,
 u'DISPLAY_LAST_COMMA_FIRST': u'James,
 LeBron',
 u'DRAFT_NUMBER': u'1',
 u'TEAM_CODE': u'cavaliers',
 u'SCHOOL': u'St. Vincent-St. Mary HS (OH)',
 u'JERSEY': u'23',
 u'PERSON_ID': 2544,
 u'SEASON_EXP': 13,
 u'LAST_AFFILIATION': u'St. Vincent-St. Mary HS (OH)/USA',
 u'DRAFT_YEAR': u'2003',
 u'TEAM_CITY': u'Cleveland'
}]

player_summary.headline_stats()

player_summary = player.PlayerSummary("2544")
print(player_summary.headline_stats())

[{
 u'PLAYER_NAME': u'LeBron James',
 u'AST': 8.6,
 u'PIE': 0.181,
 u'REB': 7.9,
 u'TimeFrame': u'2016-17',
 u'PLAYER_ID': 2544,
 u'PTS': 25.4
}]
from nba_py import player – player.PlayerGeneralSplits() – endpoint: playerdashboardbygeneralsplits
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_general_splits.overall()

player_general_splits = player.PlayerGeneralSplits("2544")
print(player_general_splits.overall())

[{
 u'PF_RANK': 1,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 0.6,
 u'MIN': 37.1,
 u'DREB_RANK': 1,
 u'TOV': 3.9,
 u'TD3': 3,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'2016-17',
 u'REB': 7.9,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': u'2016-17',
 u'W_RANK': 1,
 u'FG3A': 4.9,
 u'AST': 8.6,
 u'FTM_RANK': 1,
 u'DD2': 14,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 10.5,
 u'FG3M': 1.9,
 u'OREB': 1.4,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 1,
 u'FGM': 9.4,
 u'PF': 1.6,
 u'TD3_RANK': 1,
 u'PTS': 25.4,
 u'FGA': 18.4,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 28,
 u'STL': 1.4,
 u'AST_RANK': 1,
 u'CFID': 33,
 u'L': 4,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 6.9,
 u'W': 24,
 u'W_PCT': 0.857,
 u'DREB': 6.5,
 u'FTM': 4.7,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.679,
 u'BLK_RANK': 1,
 u'PFD': 5.4,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.513,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Overall',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.377,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 1,
 u'BLKA': 0.8,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
}]
from nba_py import player – player.PlayerOpponentSplits() – endpoint: playerdashboardbyopponent
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_opponent_splits.by_conference()

player_opponent_splits = player.PlayerOpponentSplits("2544")
print(player_opponent_splits.by_conference())

[{ 
 u'PF_RANK': 1,
 u'FGM_RANK': 1,
 u'FTA_RANK': 2,
 u'BLK': 0.7,
 u'MIN': 37.5,
 u'DREB_RANK': 2,
 u'TOV': 3.9,
 u'TD3': 2,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'East',
 u'REB': 7.8,
 u'DD2_RANK': 1,
 u'REB_RANK': 2,
 u'CFPARAMS': u'East',
 u'W_RANK': 1,
 u'FG3A': 5.1,
 u'AST': 8.8,
 u'FTM_RANK': 2,
 u'DD2': 10,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 10.5,
 u'FG3M': 2.0,
 u'OREB': 1.3,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 1,
 u'FGM': 9.8,
 u'PF': 1.7,
 u'TD3_RANK': 1,
 u'PTS': 26.0,
 u'FGA': 19.0,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 21,
 u'STL': 1.2,
 u'AST_RANK': 1,
 u'CFID': 41,
 u'L': 3,
 u'PLUS_MINUS_RANK': 2,
 u'FTA': 6.3,
 u'W': 18,
 u'W_PCT': 0.857,
 u'DREB': 6.5,
 u'FTM': 4.4,
 u'PFD_RANK': 2,
 u'FT_PCT': 0.699,
 u'BLK_RANK': 1,
 u'PFD': 5.3,
 u'MIN_RANK': 1,
 u'OREB_RANK': 2,
 u'FG_PCT': 0.518,
 u'STL_RANK': 2,
 u'GROUP_SET': u'vs. Conference',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.38,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 2,
 u'BLKA': 0.9,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
 },
 {
 u'PF_RANK': 2,
 u'FGM_RANK': 2,
 u'FTA_RANK': 1,
 u'BLK': 0.4,
 u'MIN': 35.9,
 u'DREB_RANK': 1,
 u'TOV': 4.1,
 u'TD3': 1,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'West',
 u'REB': 8.4,
 u'DD2_RANK': 2,
 u'REB_RANK': 1,
 u'CFPARAMS': u'West',
 u'W_RANK': 2,
 u'FG3A': 4.3,
 u'AST': 8.3,
 u'FTM_RANK': 1,
 u'DD2': 4,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 10.6,
 u'FG3M': 1.6,
 u'OREB': 1.7,
 u'L_RANK': 2,
 u'FT_PCT_RANK': 2,
 u'FGM': 8.3,
 u'PF': 1.6,
 u'TD3_RANK': 2,
 u'PTS': 23.6,
 u'FGA': 16.7,
 u'FG3M_RANK': 2,
 u'FGA_RANK': 2,
 u'BLKA_RANK': 2,
 u'GP': 7,
 u'STL': 1.9,
 u'AST_RANK': 2,
 u'CFID': 41,
 u'L': 1,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 8.6,
 u'W': 6,
 u'W_PCT': 0.857,
 u'DREB': 6.7,
 u'FTM': 5.4,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.633,
 u'BLK_RANK': 2,
 u'PFD': 5.9,
 u'MIN_RANK': 2,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.496,
 u'STL_RANK': 1,
 u'GROUP_SET': u'vs. Conference',
 u'FG3_PCT_RANK': 2,
 u'FG3_PCT': 0.367,
 u'FG_PCT_RANK': 2,
 u'TOV_RANK': 1,
 u'BLKA': 0.6,
 u'GP_RANK': 2,
 u'PTS_RANK': 2
}]

player_opponent_splits.by_division()

player_opponent_splits = player.PlayerOpponentSplits("2544")
print(player_opponent_splits.by_division())

[{
 u'PF_RANK': 5,
 u'FGM_RANK': 4,
 u'FTA_RANK': 4,
 u'BLK': 0.7,
 u'MIN': 36.8,
 u'DREB_RANK': 4,
 u'TOV': 4.0,
 u'TD3': 2,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'Atlantic',
 u'REB': 8.0,
 u'DD2_RANK': 1,
 u'REB_RANK': 4,
 u'CFPARAMS': u'Atlantic',
 u'W_RANK': 1,
 u'FG3A': 4.5,
 u'AST': 10.6,
 u'FTM_RANK': 2,
 u'DD2': 6,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 13.2,
 u'FG3M': 1.2,
 u'OREB': 1.7,
 u'L_RANK': 4,
 u'FT_PCT_RANK': 2,
 u'FGM': 9.1,
 u'PF': 1.6,
 u'TD3_RANK': 1,
 u'PTS': 25.0,
 u'FGA': 17.9,
 u'FG3M_RANK': 5,
 u'FGA_RANK': 5,
 u'BLKA_RANK': 1,
 u'GP': 10,
 u'STL': 1.2,
 u'AST_RANK': 2,
 u'CFID': 42,
 u'L': 0,
 u'PLUS_MINUS_RANK': 3,
 u'FTA': 7.6,
 u'W': 10,
 u'W_PCT': 1.0,
 u'DREB': 6.3,
 u'FTM': 5.6,
 u'PFD_RANK': 3,
 u'FT_PCT': 0.737,
 u'BLK_RANK': 3,
 u'PFD': 5.9,
 u'MIN_RANK': 5,
 u'OREB_RANK': 2,
 u'FG_PCT': 0.508,
 u'STL_RANK': 5,
 u'GROUP_SET': u'vs. Division',
 u'FG3_PCT_RANK': 5,
 u'FG3_PCT': 0.267,
 u'FG_PCT_RANK': 4,
 u'TOV_RANK': 3,
 u'BLKA': 1.1,
 u'GP_RANK': 1,
 u'PTS_RANK': 4
 },...
 {
 u'PF_RANK': 1,
 u'FGM_RANK': 6,
 u'FTA_RANK': 3,
 u'BLK': 0.0,
 u'MIN': 33.8,
 u'DREB_RANK': 3,
 u'TOV': 4.7,
 u'TD3': 0,
 u'FG3A_RANK': 5,
 u'GROUP_VALUE': u'Southwest',
 u'REB': 8.0,
 u'DD2_RANK': 2,
 u'REB_RANK': 5,
 u'CFPARAMS': u'Southwest',
 u'W_RANK': 3,
 u'FG3A': 4.0,
 u'AST': 9.0,
 u'FTM_RANK': 3,
 u'DD2': 2,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 18.7,
 u'FG3M': 1.0,
 u'OREB': 1.3,
 u'L_RANK': 4,
 u'FT_PCT_RANK': 3,
 u'FGM': 7.0,
 u'PF': 2.0,
 u'TD3_RANK': 3,
 u'PTS': 20.3,
 u'FGA': 14.0,
 u'FG3M_RANK': 6,
 u'FGA_RANK': 6,
 u'BLKA_RANK': 6,
 u'GP': 3,
 u'STL': 1.3,
 u'AST_RANK': 3,
 u'CFID': 42,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 7.7,
 u'W': 3,
 u'W_PCT': 1.0,
 u'DREB': 6.7,
 u'FTM': 5.3,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.696,
 u'BLK_RANK': 6,
 u'PFD': 6.0,
 u'MIN_RANK': 6,
 u'OREB_RANK': 3,
 u'FG_PCT': 0.5,
 u'STL_RANK': 4,
 u'GROUP_SET': u'vs. Division',
 u'FG3_PCT_RANK': 6,
 u'FG3_PCT': 0.25,
 u'FG_PCT_RANK': 5,
 u'TOV_RANK': 1,
 u'BLKA': 0.0,
 u'GP_RANK': 4,
 u'PTS_RANK': 6
}]

player_opponent_splits.by_opponent()

player_opponent_splits = player.PlayerOpponentSplits("2544")
print(player_opponent_splits.by_opponent())

[{
 u'PF_RANK': 2,
 u'FGM_RANK': 14,
 u'FTA_RANK': 16,
 u'BLK': 0.0,
 u'MIN': 36.9,
 u'DREB_RANK': 7,
 u'TOV': 1.0,
 u'TD3': 0,
 u'FG3A_RANK': 7,
 u'GROUP_VALUE': u'Atlanta Hawks',
 u'REB': 9.0,
 u'DD2_RANK': 13,
 u'REB_RANK': 6,
 u'CFPARAMS': u'Atlanta Hawks',
 u'W_RANK': 18,
 u'FG3A': 5.0,
 u'AST': 5.0,
 u'FTM_RANK': 11,
 u'DD2': 0,
 u'W_PCT_RANK': 18,
 u'PLUS_MINUS': 7.0,
 u'FG3M': 2.0,
 u'OREB': 2.0,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 1,
 u'FGM': 8.0,
 u'PF': 3.0,
 u'TD3_RANK': 4,
 u'PTS': 23.0,
 u'FGA': 17.0,
 u'FG3M_RANK': 6,
 u'FGA_RANK': 13,
 u'BLKA_RANK': 8,
 u'GP': 1,
 u'STL': 3.0,
 u'AST_RANK': 17,
 u'CFID': 43,
 u'L': 1,
 u'PLUS_MINUS_RANK': 13,
 u'FTA': 5.0,
 u'W': 0,
 u'W_PCT': 0.0,
 u'DREB': 7.0,
 u'FTM': 5.0,
 u'PFD_RANK': 20,
 u'FT_PCT': 1.0,
 u'BLK_RANK': 17,
 u'PFD': 2.0,
 u'MIN_RANK': 13,
 u'OREB_RANK': 5,
 u'FG_PCT': 0.471,
 u'STL_RANK': 1,
 u'GROUP_SET': u'vs. Opponent',
 u'FG3_PCT_RANK': 6,
 u'FG3_PCT': 0.4,
 u'FG_PCT_RANK': 15,
 u'TOV_RANK': 19,
 u'BLKA': 1.0,
 u'GP_RANK': 7,
 u'PTS_RANK': 14
 },...
 {
 u'PF_RANK': 15,
 u'FGM_RANK': 9,
 u'FTA_RANK': 5,
 u'BLK': 2.0,
 u'MIN': 38.1,
 u'DREB_RANK': 2,
 u'TOV': 6.0,
 u'TD3': 0,
 u'FG3A_RANK': 11,
 u'GROUP_VALUE': u'Washington Wizards',
 u'REB': 10.0,
 u'DD2_RANK': 3,
 u'REB_RANK': 4,
 u'CFPARAMS': u'Washington Wizards',
 u'W_RANK': 7,
 u'FG3A': 4.0,
 u'AST': 5.0,
 u'FTM_RANK': 5,
 u'DD2': 1,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 7.0,
 u'FG3M': 3.0,
 u'OREB': 0.0,
 u'L_RANK': 5,
 u'FT_PCT_RANK': 8,
 u'FGM': 9.0,
 u'PF': 1.0,
 u'TD3_RANK': 4,
 u'PTS': 27.0,
 u'FGA': 18.0,
 u'FG3M_RANK': 4,
 u'FGA_RANK': 10,
 u'BLKA_RANK': 18,
 u'GP': 1,
 u'STL': 2.0,
 u'AST_RANK': 16,
 u'CFID': 43,
 u'L': 0,
 u'PLUS_MINUS_RANK': 12,
 u'FTA': 9.0,
 u'W': 1,
 u'W_PCT': 1.0,
 u'DREB': 10.0,
 u'FTM': 6.0,
 u'PFD_RANK': 3,
 u'FT_PCT': 0.667,
 u'BLK_RANK': 2,
 u'PFD': 8.0,
 u'MIN_RANK': 10,
 u'OREB_RANK': 20,
 u'FG_PCT': 0.5,
 u'STL_RANK': 7,
 u'GROUP_SET': u'vs. Opponent',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.75,
 u'FG_PCT_RANK': 11,
 u'TOV_RANK': 3,
 u'BLKA': 0.0,
 u'GP_RANK': 7,
 u'PTS_RANK': 7
}]
from nba_py import player – player.PlayerLastNGamesSplits() – endpoint: playerdashboardbylastngames
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_last_ngames_splits.by_last5()

player_last_ngames_splits = player.PlayerLastNGamesSplits("2544")
print(player_last_ngames_splits.last5())

[{ 
 u'PF_RANK': 1,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 1.0,
 u'MIN': 38.6,
 u'DREB_RANK': 1,
 u'TOV': 3.6,
 u'TD3': 0,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'2016-17',
 u'REB': 9.4,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': u'2016-17',
 u'W_RANK': 1,
 u'FG3A': 6.6,
 u'AST': 6.8,
 u'FTM_RANK': 1,
 u'DD2': 3,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 14.2,
 u'FG3M': 3.0,
 u'OREB': 2.4,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 1,
 u'FGM': 10.4,
 u'PF': 1.2,
 u'TD3_RANK': 1,
 u'PTS': 27.2,
 u'FGA': 21.0,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 5,
 u'STL': 1.4,
 u'AST_RANK': 1,
 u'CFID': 39,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 5.4,
 u'W': 5,
 u'W_PCT': 1.0,
 u'DREB': 7.0,
 u'FTM': 3.4,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.63,
 u'BLK_RANK': 1,
 u'PFD': 4.8,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.495,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Last 5 Games',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.455,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 1,
 u'BLKA': 1.0,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
}]

player_last_ngames_splits.by_last10()

player_last_ngames_splits.by_last15()

player_last_ngames_splits.by_last20()

player_last_ngames_splits.gamenumber()

player_last_ngames_splits = player.PlayerLastNGamesSplits("2544")
print(player_last_ngames_splits.gamenumber())


[{
 u'PF_RANK': 1,
 u'FGM_RANK': 4,
 u'FTA_RANK': 3,
 u'BLK': 0.6,
 u'MIN': 37.0,
 u'DREB_RANK': 1,
 u'TOV': 3.7,
 u'TD3': 1,
 u'FG3A_RANK': 3,
 u'GROUP_VALUE': u'Games 1-10',
 u'REB': 8.9,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': u'Games 1-10',
 u'W_RANK': 1,
 u'FG3A': 4.6,
 u'AST': 9.7,
 u'FTM_RANK': 2,
 u'DD2': 6,
 u'W_PCT_RANK': 3,
 u'PLUS_MINUS': 9.8,
 u'FG3M': 1.6,
 u'OREB': 1.3,
 u'L_RANK': 2,
 u'FT_PCT_RANK': 2,
 u'FGM': 8.5,
 u'PF': 2.0,
 u'TD3_RANK': 2,
 u'PTS': 23.4,
 u'FGA': 17.4,
 u'FG3M_RANK': 3,
 u'FGA_RANK': 3,
 u'BLKA_RANK': 1,
 u'GP': 10,
 u'STL': 1.1,
 u'AST_RANK': 2,
 u'CFID': 35,
 u'L': 1,
 u'PLUS_MINUS_RANK': 2,
 u'FTA': 6.8,
 u'W': 9,
 u'W_PCT': 0.9,
 u'DREB': 7.6,
 u'FTM': 4.8,
 u'PFD_RANK': 3,
 u'FT_PCT': 0.706,
 u'BLK_RANK': 3,
 u'PFD': 5.2,
 u'MIN_RANK': 3,
 u'OREB_RANK': 3,
 u'FG_PCT': 0.489,
 u'STL_RANK': 3,
 u'GROUP_SET': u'Game Number',
 u'FG3_PCT_RANK': 3,
 u'FG3_PCT': 0.348,
 u'FG_PCT_RANK': 4,
 u'TOV_RANK': 3,
 u'BLKA': 1.1,
 u'GP_RANK': 1,
 u'PTS_RANK': 3
 },
 {
 u'PF_RANK': 3,
 u'FGM_RANK': 3,
 u'FTA_RANK': 1,
 u'BLK': 0.3,
 u'MIN': 35.7,
 u'DREB_RANK': 4,
 u'TOV': 4.3,
 u'TD3': 2,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'Games 11-20',
 u'REB': 6.2,
 u'DD2_RANK': 2,
 u'REB_RANK': 4,
 u'CFPARAMS': u'Games 11-20',
 u'W_RANK': 3,
 u'FG3A': 4.1,
 u'AST': 8.4,
 u'FTM_RANK': 1,
 u'DD2': 4,
 u'W_PCT_RANK': 4,
 u'PLUS_MINUS': 8.8,
 u'FG3M': 1.4,
 u'OREB': 1.0,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 1,
 u'FGM': 8.9,
 u'PF': 1.4,
 u'TD3_RANK': 1,
 u'PTS': 24.6,
 u'FGA': 17.2,
 u'FG3M_RANK': 4,
 u'FGA_RANK': 4,
 u'BLKA_RANK': 4,
 u'GP': 9,
 u'STL': 1.1,
 u'AST_RANK': 3,
 u'CFID': 35,
 u'L': 3,
 u'PLUS_MINUS_RANK': 3,
 u'FTA': 7.3,
 u'W': 6,
 u'W_PCT': 0.667,
 u'DREB': 5.2,
 u'FTM': 5.3,
 u'PFD_RANK': 2,
 u'FT_PCT': 0.727,
 u'BLK_RANK': 4,
 u'PFD': 5.8,
 u'MIN_RANK': 4,
 u'OREB_RANK': 4,
 u'FG_PCT': 0.516,
 u'STL_RANK': 2,
 u'GROUP_SET': u'Game Number',
 u'FG3_PCT_RANK': 2,
 u'FG3_PCT': 0.351,
 u'FG_PCT_RANK': 2,
 u'TOV_RANK': 2,
 u'BLKA': 0.6,
 u'GP_RANK': 2,
 u'PTS_RANK': 2
 },
 {
 u'PF_RANK': 4,
 u'FGM_RANK': 1,
 u'FTA_RANK': 4,
 u'BLK': 0.6,
 u'MIN': 38.1,
 u'DREB_RANK': 2,
 u'TOV': 3.3,
 u'TD3': 0,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'Games 21-30',
 u'REB': 8.6,
 u'DD2_RANK': 3,
 u'REB_RANK': 2,
 u'CFPARAMS': u'Games 21-30',
 u'W_RANK': 2,
 u'FG3A': 6.1,
 u'AST': 7.3,
 u'FTM_RANK': 3,
 u'DD2': 3,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 14.5,
 u'FG3M': 2.6,
 u'OREB': 1.9,
 u'L_RANK': 3,
 u'FT_PCT_RANK': 3,
 u'FGM': 11.3,
 u'PF': 1.4,
 u'TD3_RANK': 3,
 u'PTS': 29.1,
 u'FGA': 21.0,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 3,
 u'GP': 8,
 u'STL': 2.1,
 u'AST_RANK': 4,
 u'CFID': 35,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 6.5,
 u'W': 8,
 u'W_PCT': 1.0,
 u'DREB': 6.8,
 u'FTM': 4.0,
 u'PFD_RANK': 4,
 u'FT_PCT': 0.615,
 u'BLK_RANK': 2,
 u'PFD': 5.1,
 u'MIN_RANK': 2,
 u'OREB_RANK': 2,
 u'FG_PCT': 0.536,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Game Number',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.429,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 4,
 u'BLKA': 0.6,
 u'GP_RANK': 3,
 u'PTS_RANK': 1
 },
 {
 u'PF_RANK': 2,
 u'FGM_RANK': 2,
 u'FTA_RANK': 2,
 u'BLK': 3.0,
 u'MIN': 43.7,
 u'DREB_RANK': 3,
 u'TOV': 8.0,
 u'TD3': 0,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'Games 31-40',
 u'REB': 8.0,
 u'DD2_RANK': 4,
 u'REB_RANK': 3,
 u'CFPARAMS': u'Games 31-40',
 u'W_RANK': 4,
 u'FG3A': 6.0,
 u'AST': 11.0,
 u'FTM_RANK': 4,
 u'DD2': 1,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 1.0,
 u'FG3M': 2.0,
 u'OREB': 2.0,
 u'L_RANK': 3,
 u'FT_PCT_RANK': 4,
 u'FGM': 9.0,
 u'PF': 2.0,
 u'TD3_RANK': 3,
 u'PTS': 23.0,
 u'FGA': 18.0,
 u'FG3M_RANK': 2,
 u'FGA_RANK': 2,
 u'BLKA_RANK': 2,
 u'GP': 1,
 u'STL': 1.0,
 u'AST_RANK': 1,
 u'CFID': 35,
 u'L': 0,
 u'PLUS_MINUS_RANK': 4,
 u'FTA': 7.0,
 u'W': 1,
 u'W_PCT': 1.0,
 u'DREB': 6.0,
 u'FTM': 3.0,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.429,
 u'BLK_RANK': 1,
 u'PFD': 7.0,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.5,
 u'STL_RANK': 4,
 u'GROUP_SET': u'Game Number',
 u'FG3_PCT_RANK': 4,
 u'FG3_PCT': 0.333,
 u'FG_PCT_RANK': 3,
 u'TOV_RANK': 1,
 u'BLKA': 1.0,
 u'GP_RANK': 4,
 u'PTS_RANK': 4
}]
from nba_py import player – player.PlayerInGameSplits() – endpoint: playerdashboardbygamesplits
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_game_splits.by_half()

player_game_splits = player.PlayerInGameSplits("2544")
print(player_game_splits.by_half())

[{
 u'PF_RANK': 3,
 u'FGM_RANK': 2,
 u'FTA_RANK': 2,
 u'BLK': 0.2,
 u'MIN': 18.9,
 u'DREB_RANK': 2,
 u'TOV': 2.0,
 u'TD3': 3,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'First Half',
 u'REB': 4.3,
 u'DD2_RANK': 1,
 u'REB_RANK': 2,
 u'CFPARAMS': u'First Half',
 u'W_RANK': 1,
 u'FG3A': 1.9,
 u'AST': 5.0,
 u'FTM_RANK': 1,
 u'DD2': 14,
 u'W_PCT_RANK': 2,
 u'PLUS_MINUS': 7.3,
 u'FG3M': 0.6,
 u'OREB': 0.7,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 2,
 u'FGM': 4.6,
 u'PF': 0.5,
 u'TD3_RANK': 1,
 u'PTS': 12.0,
 u'FGA': 8.8,
 u'FG3M_RANK': 3,
 u'FGA_RANK': 2,
 u'BLKA_RANK': 2,
 u'GP': 28,
 u'STL': 0.8,
 u'AST_RANK': 1,
 u'CFID': 24,
 u'L': 4,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 3.3,
 u'W': 24,
 u'W_PCT': 0.857,
 u'DREB': 3.6,
 u'FTM': 2.3,
 u'PFD_RANK': 2,
 u'FT_PCT': 0.707,
 u'BLK_RANK': 2,
 u'PFD': 2.5,
 u'MIN_RANK': 1,
 u'OREB_RANK': 2,
 u'FG_PCT': 0.518,
 u'STL_RANK': 1,
 u'GROUP_SET': u'By Half',
 u'FG3_PCT_RANK': 3,
 u'FG3_PCT': 0.296,
 u'FG_PCT_RANK': 2,
 u'TOV_RANK': 1,
 u'BLKA': 0.4,
 u'GP_RANK': 1,
 u'PTS_RANK': 2
 },
 {
 u'PF_RANK': 1,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 0.4,
 u'MIN': 18.0,
 u'DREB_RANK': 3,
 u'TOV': 1.9,
 u'TD3': 3,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'Second Half',
 u'REB': 3.5,
 u'DD2_RANK': 1,
 u'REB_RANK': 3,
 u'CFPARAMS': u'Second Half',
 u'W_RANK': 1,
 u'FG3A': 3.0,
 u'AST': 3.6,
 u'FTM_RANK': 2,
 u'DD2': 14,
 u'W_PCT_RANK': 2,
 u'PLUS_MINUS': 3.0,
 u'FG3M': 1.3,
 u'OREB': 0.7,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 3,
 u'FGM': 4.8,
 u'PF': 1.1,
 u'TD3_RANK': 1,
 u'PTS': 13.1,
 u'FGA': 9.5,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 28,
 u'STL': 0.6,
 u'AST_RANK': 2,
 u'CFID': 24,
 u'L': 4,
 u'PLUS_MINUS_RANK': 3,
 u'FTA': 3.5,
 u'W': 24,
 u'W_PCT': 0.857,
 u'DREB': 2.8,
 u'FTM': 2.3,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.646,
 u'BLK_RANK': 1,
 u'PFD': 2.9,
 u'MIN_RANK': 2,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.504,
 u'STL_RANK': 2,
 u'GROUP_SET': u'By Half',
 u'FG3_PCT_RANK': 2,
 u'FG3_PCT': 0.422,
 u'FG_PCT_RANK': 3,
 u'TOV_RANK': 2,
 u'BLKA': 0.4,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
 
 },
 {
 u'PF_RANK': 2,
 u'FGM_RANK': 3,
 u'FTA_RANK': 3,
 u'BLK': 0.0,
 u'MIN': 5.0,
 u'DREB_RANK': 1,
 u'TOV': 0.0,
 u'TD3': 0,
 u'FG3A_RANK': 3,
 u'GROUP_VALUE': u'Overtime',
 u'REB': 5.0,
 u'DD2_RANK': 3,
 u'REB_RANK': 1,
 u'CFPARAMS': u'Overtime',
 u'W_RANK': 3,
 u'FG3A': 1.0,
 u'AST': 1.0,
 u'FTM_RANK': 3,
 u'DD2': 1,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 6.0,
 u'FG3M': 1.0,
 u'OREB': 0.0,
 u'L_RANK': 3,
 u'FT_PCT_RANK': 1,
 u'FGM': 2.0,
 u'PF': 1.0,
 u'TD3_RANK': 3,
 u'PTS': 7.0,
 u'FGA': 2.0,
 u'FG3M_RANK': 2,
 u'FGA_RANK': 3,
 u'BLKA_RANK': 3,
 u'GP': 1,
 u'STL': 0.0,
 u'AST_RANK': 3,
 u'CFID': 24,
 u'L': 0,
 u'PLUS_MINUS_RANK': 2,
 u'FTA': 2.0,
 u'W': 1,
 u'W_PCT': 1.0,
 u'DREB': 5.0,
 u'FTM': 2.0,
 u'PFD_RANK': 3,
 u'FT_PCT': 1.0,
 u'BLK_RANK': 3,
 u'PFD': 2.0,
 u'MIN_RANK': 3,
 u'OREB_RANK': 3,
 u'FG_PCT': 1.0,
 u'STL_RANK': 3,
 u'GROUP_SET': u'By Half',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 1.0,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 3,
 u'BLKA': 0.0,
 u'GP_RANK': 3,
 u'PTS_RANK': 3
}]

player_game_splits.by_period()

player_game_splits = player.PlayerInGameSplits("2544")
print(player_game_splits.by_period())

[{
 u'PF_RANK': 5,
 u'FGM_RANK': 4,
 u'FTA_RANK': 5,
 u'BLK': 0.0,
 u'MIN': 9.7,
 u'DREB_RANK': 4,
 u'TOV': 1.0,
 u'TD3': 3,
 u'FG3A_RANK': 5,
 u'GROUP_VALUE': 1,
 u'REB': 2.0,
 u'DD2_RANK': 1,
 u'REB_RANK': 4,
 u'CFPARAMS': u'1',
 u'W_RANK': 1,
 u'FG3A': 0.6,
 u'AST': 2.9,
 u'FTM_RANK': 5,
 u'DD2': 14,
 u'W_PCT_RANK': 3,
 u'PLUS_MINUS': 6.0,
 u'FG3M': 0.2,
 u'OREB': 0.2,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 2,
 u'FGM': 2.2,
 u'PF': 0.1,
 u'TD3_RANK': 1,
 u'PTS': 5.4,
 u'FGA': 4.0,
 u'FG3M_RANK': 5,
 u'FGA_RANK': 4,
 u'BLKA_RANK': 2,
 u'GP': 28,
 u'STL': 0.5,
 u'AST_RANK': 1,
 u'CFID': 25,
 u'L': 4,
 u'PLUS_MINUS_RANK': 2,
 u'FTA': 1.2,
 u'W': 24,
 u'W_PCT': 0.857,
 u'DREB': 1.8,
 u'FTM': 0.9,
 u'PFD_RANK': 5,
 u'FT_PCT': 0.727,
 u'BLK_RANK': 4,
 u'PFD': 0.9,
 u'MIN_RANK': 2,
 u'OREB_RANK': 4,
 u'FG_PCT': 0.54,
 u'STL_RANK': 2,
 u'GROUP_SET': u'By Period',
 u'FG3_PCT_RANK': 4,
 u'FG3_PCT': 0.375,
 u'FG_PCT_RANK': 2,
 u'TOV_RANK': 3,
 u'BLKA': 0.2,
 u'GP_RANK': 1,
 u'PTS_RANK': 5
 },...
 {
 u'PF_RANK': 1,
 u'FGM_RANK': 5,
 u'FTA_RANK': 3,
 u'BLK': 0.0,
 u'MIN': 5.0,
 u'DREB_RANK': 1,
 u'TOV': 0.0,
 u'TD3': 0,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': 5,
 u'REB': 5.0,
 u'DD2_RANK': 5,
 u'REB_RANK': 1,
 u'CFPARAMS': u'5',
 u'W_RANK': 5,
 u'FG3A': 1.0,
 u'AST': 1.0,
 u'FTM_RANK': 1,
 u'DD2': 1,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 6.0,
 u'FG3M': 1.0,
 u'OREB': 0.0,
 u'L_RANK': 5,
 u'FT_PCT_RANK': 1,
 u'FGM': 2.0,
 u'PF': 1.0,
 u'TD3_RANK': 5,
 u'PTS': 7.0,
 u'FGA': 2.0,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 5,
 u'BLKA_RANK': 5,
 u'GP': 1,
 u'STL': 0.0,
 u'AST_RANK': 5,
 u'CFID': 25,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 2.0,
 u'W': 1,
 u'W_PCT': 1.0,
 u'DREB': 5.0,
 u'FTM': 2.0,
 u'PFD_RANK': 1,
 u'FT_PCT': 1.0,
 u'BLK_RANK': 5,
 u'PFD': 2.0,
 u'MIN_RANK': 5,
 u'OREB_RANK': 5,
 u'FG_PCT': 1.0,
 u'STL_RANK': 5,
 u'GROUP_SET': u'By Period',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 1.0,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 5,
 u'BLKA': 0.0,
 u'GP_RANK': 5,
 u'PTS_RANK': 2
}]

player_game_splits.by_score_margin()

player_game_splits = player.PlayerInGameSplits("2544")
print(player_game_splits.by_score_margin())

[{
 u'PF_RANK': 6,
 u'FGM_RANK': 6,
 u'FTA_RANK': 6,
 u'BLK': 0.0,
 u'MIN': 2.0,
 u'DREB_RANK': 6,
 u'TOV': 0.2,
 u'TD3': 3,
 u'FG3A_RANK': 6,
 u'GROUP_VALUE': u'Tied',
 u'REB': 0.3,
 u'DD2_RANK': 1,
 u'REB_RANK': 6,
 u'CFPARAMS': u'Tied',
 u'W_RANK': 1,
 u'FG3A': 0.1,
 u'AST': 0.5,
 u'FTM_RANK': 6,
 u'DD2': 14,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 0.7,
 u'FG3M': 0.0,
 u'OREB': 0.1,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 4,
 u'FGM': 0.3,
 u'PF': 0.1,
 u'TD3_RANK': 1,
 u'PTS': 0.7,
 u'FGA': 0.6,
 u'FG3M_RANK': 6,
 u'FGA_RANK': 6,
 u'BLKA_RANK': 6,
 u'GP': 28,
 u'STL': 0.1,
 u'AST_RANK': 6,
 u'CFID': 26,
 u'L': 4,
 u'PLUS_MINUS_RANK': 4,
 u'FTA': 0.2,
 u'W': 24,
 u'W_PCT': 0.857,
 u'DREB': 0.3,
 u'FTM': 0.1,
 u'PFD_RANK': 6,
 u'FT_PCT': 0.667,
 u'BLK_RANK': 6,
 u'PFD': 0.1,
 u'MIN_RANK': 6,
 u'OREB_RANK': 6,
 u'FG_PCT': 0.438,
 u'STL_RANK': 6,
 u'GROUP_SET': u'By Score Margin',
 u'FG3_PCT_RANK': 4,
 u'FG3_PCT': 0.333,
 u'FG_PCT_RANK': 6,
 u'TOV_RANK': 6,
 u'BLKA': 0.0,
 u'GP_RANK': 1,
 u'PTS_RANK': 6
 },...
 {
 u'PF_RANK': 5,
 u'FGM_RANK': 4,
 u'FTA_RANK': 3,
 u'BLK': 0.1,
 u'MIN': 5.2,
 u'DREB_RANK': 5,
 u'TOV': 0.8,
 u'TD3': 2,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'more than 20 Points',
 u'REB': 0.9,
 u'DD2_RANK': 6,
 u'REB_RANK': 5,
 u'CFPARAMS': u'more than 20 Points',
 u'W_RANK': 6,
 u'FG3A': 0.8,
 u'AST': 0.8,
 u'FTM_RANK': 3,
 u'DD2': 3,
 u'W_PCT_RANK': 5,
 u'PLUS_MINUS': 1.8,
 u'FG3M': 0.2,
 u'OREB': 0.2,
 u'L_RANK': 6,
 u'FT_PCT_RANK': 1,
 u'FGM': 1.3,
 u'PF': 0.3,
 u'TD3_RANK': 5,
 u'PTS': 3.8,
 u'FGA': 3.0,
 u'FG3M_RANK': 5,
 u'FGA_RANK': 3,
 u'BLKA_RANK': 4,
 u'GP': 12,
 u'STL': 0.4,
 u'AST_RANK': 5,
 u'CFID': 26,
 u'L': 2,
 u'PLUS_MINUS_RANK': 3,
 u'FTA': 1.2,
 u'W': 10,
 u'W_PCT': 0.833,
 u'DREB': 0.8,
 u'FTM': 0.9,
 u'PFD_RANK': 4,
 u'FT_PCT': 0.786,
 u'BLK_RANK': 4,
 u'PFD': 0.9,
 u'MIN_RANK': 5,
 u'OREB_RANK': 4,
 u'FG_PCT': 0.444,
 u'STL_RANK': 2,
 u'GROUP_SET': u'By Score Margin',
 u'FG3_PCT_RANK': 6,
 u'FG3_PCT': 0.222,
 u'FG_PCT_RANK': 5,
 u'TOV_RANK': 3,
 u'BLKA': 0.1,
 u'GP_RANK': 6,
 u'PTS_RANK': 4
}]

player_game_splits.by_actual_margin()

player_game_splits = player.PlayerInGameSplits("2544")
print(player_game_splits.by_actual_margin())

[{
 u'PF_RANK': 2,
 u'FGM_RANK': 10,
 u'FTA_RANK': 11,
 u'BLK': 0.0,
 u'MIN': 1.6,
 u'DREB_RANK': 11,
 u'TOV': 0.0,
 u'TD3': 0,
 u'FG3A_RANK': 11,
 u'GROUP_VALUE': u'Behind more than 20 Points',
 u'REB': 0.0,
 u'DD2_RANK': 10,
 u'REB_RANK': 11,
 u'CFPARAMS': u'Behind more than 20 Points',
 u'W_RANK': 10,
 u'FG3A': 0.0,
 u'AST': 0.5,
 u'FTM_RANK': 11,
 u'DD2': 0,
 u'W_PCT_RANK': 10,
 u'PLUS_MINUS': 3.0,
 u'FG3M': 0.0,
 u'OREB': 0.0,
 u'L_RANK': 8,
 u'FT_PCT_RANK': 11,
 u'FGM': 0.5,
 u'PF': 0.5,
 u'TD3_RANK': 10,
 u'PTS': 1.0,
 u'FGA': 0.5,
 u'FG3M_RANK': 10,
 u'FGA_RANK': 11,
 u'BLKA_RANK': 9,
 u'GP': 2,
 u'STL': 0.0,
 u'AST_RANK': 9,
 u'CFID': 23,
 u'L': 2,
 u'PLUS_MINUS_RANK': 3,
 u'FTA': 0.0,
 u'W': 0,
 u'W_PCT': 0.0,
 u'DREB': 0.0,
 u'FTM': 0.0,
 u'PFD_RANK': 11,
 u'FT_PCT': 0.0,
 u'BLK_RANK': 8,
 u'PFD': 0.0,
 u'MIN_RANK': 11,
 u'OREB_RANK': 10,
 u'FG_PCT': 1.0,
 u'STL_RANK': 11,
 u'GROUP_SET': u'By Actual Margin',
 u'FG3_PCT_RANK': 10,
 u'FG3_PCT': 0.0,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 9,
 u'BLKA': 0.0,
 u'GP_RANK': 11,
 u'PTS_RANK': 10
 },...
 {
 u'PF_RANK': 8,
 u'FGM_RANK': 5,
 u'FTA_RANK': 2,
 u'BLK': 0.1,
 u'MIN': 5.9,
 u'DREB_RANK': 7,
 u'TOV': 0.9,
 u'TD3': 2,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'Ahead more than 20 Points',
 u'REB': 1.1,
 u'DD2_RANK': 9,
 u'REB_RANK': 6,
 u'CFPARAMS': u'Ahead more than 20 Points',
 u'W_RANK': 7,
 u'FG3A': 0.9,
 u'AST': 0.8,
 u'FTM_RANK': 2,
 u'DD2': 3,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 1.5,
 u'FG3M': 0.2,
 u'OREB': 0.2,
 u'L_RANK': 10,
 u'FT_PCT_RANK': 2,
 u'FGM': 1.5,
 u'PF': 0.2,
 u'TD3_RANK': 5,
 u'PTS': 4.3,
 u'FGA': 3.5,
 u'FG3M_RANK': 8,
 u'FGA_RANK': 3,
 u'BLKA_RANK': 5,
 u'GP': 10,
 u'STL': 0.5,
 u'AST_RANK': 7,
 u'CFID': 23,
 u'L': 0,
 u'PLUS_MINUS_RANK': 4,
 u'FTA': 1.4,
 u'W': 10,
 u'W_PCT': 1.0,
 u'DREB': 0.9,
 u'FTM': 1.1,
 u'PFD_RANK': 3,
 u'FT_PCT': 0.786,
 u'BLK_RANK': 4,
 u'PFD': 1.1,
 u'MIN_RANK': 6,
 u'OREB_RANK': 7,
 u'FG_PCT': 0.429,
 u'STL_RANK': 1,
 u'GROUP_SET': u'By Actual Margin',
 u'FG3_PCT_RANK': 9,
 u'FG3_PCT': 0.222,
 u'FG_PCT_RANK': 10,
 u'TOV_RANK': 3,
 u'BLKA': 0.1,
 u'GP_RANK': 8,
 u'PTS_RANK': 5
}]
from nba_py import player – player.PlayerClutchSplits() – endpoint: playerdashboardbyclutch
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_clutch_splits.last5min_deficit_5point()

player_clutch_splits = player.PlayerClutchSplits("2544")
print(player_clutch_splits.last5min_deficit_5point())

[{
 u'PF_RANK': 1,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 0.0,
 u'MIN': 3.3,
 u'DREB_RANK': 1,
 u'TOV': 0.1,
 u'TD3': 0,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'2016-17',
 u'REB': 1.3,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': u'2016-17',
 u'W_RANK': 1,
 u'FG3A': 0.4,
 u'AST': 1.3,
 u'FTM_RANK': 1,
 u'DD2': 5,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 3.0,
 u'FG3M': 0.3,
 u'OREB': 0.4,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 1,
 u'FGM': 0.9,
 u'PF': 0.4,
 u'TD3_RANK': 1,
 u'PTS': 2.6,
 u'FGA': 1.4,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 7,
 u'STL': 0.1,
 u'AST_RANK': 1,
 u'CFID': 21,
 u'L': 2,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 0.7,
 u'W': 5,
 u'W_PCT': 0.714,
 u'DREB': 0.9,
 u'FTM': 0.6,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.8,
 u'BLK_RANK': 1,
 u'PFD': 0.7,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.6,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Last 5 MIN <= 5 PTS',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.667,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 1,
 u'BLKA': 0.1,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
}]

player_clutch_splits.last3min_deficit_5point()

player_clutch_splits.last1min_deficit_5point()

player_clutch_splits.last30sec_deficit_3point()

player_clutch_splits.last10sec_deficit_3point()

player_clutch_splits.last5min_plusminus_5point()

player_clutch_splits = player.PlayerClutchSplits("2544")
print(player_clutch_splits.last5min_plusminus_5point())

[{ 
 u'PF_RANK': 1,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 0.1,
 u'MIN': 3.1,
 u'DREB_RANK': 1,
 u'TOV': 0.2,
 u'TD3': 1,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'2016-17',
 u'REB': 1.1,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': u'2016-17',
 u'W_RANK': 1,
 u'FG3A': 0.6,
 u'AST': 1.0,
 u'FTM_RANK': 1,
 u'DD2': 8,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 2.5,
 u'FG3M': 0.4,
 u'OREB': 0.2,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 1,
 u'FGM': 1.0,
 u'PF': 0.4,
 u'TD3_RANK': 1,
 u'PTS': 3.2,
 u'FGA': 1.6,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 14,
 u'STL': 0.1,
 u'AST_RANK': 1,
 u'CFID': 20,
 u'L': 2,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 1.4,
 u'W': 12,
 u'W_PCT': 0.857,
 u'DREB': 0.9,
 u'FTM': 0.9,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.632,
 u'BLK_RANK': 1,
 u'PFD': 0.9,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.636,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Last 5 MIN | +/- 5PTS',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.625,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 1,
 u'BLKA': 0.1,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
}]

player_clutch_splits.last3min_plusminus_5point()

player_clutch_splits.last1min_plusminus_5point()

player_clutch_splits.last30sec_plusminus_5point()

from nba_py import player – player.PlayerShootingSplits() – endpoint: playerdashboardbyshootingsplits
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_shooting_splits.shot_5ft()

player_shooting_splits = player.PlayerShootingSplits("2544")
print(player_shooting_splits.shot_5ft())

[{
 u'PCT_AST_FGM': 0.452,
 u'FGM_RANK': 1,
 u'FGA_RANK': 1,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.452,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'Less Than 5 ft.',
 u'FG3A': 0,
 u'EFG_PCT': 0.735,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 1,
 u'PCT_AST_2PM_RANK': 1,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 5,
 u'FGM': 155,
 u'PCT_AST_FGM_RANK': 3,
 u'PCT_UAST_2PM': 0.548,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 9,
 u'CFPARAMS': u'Less Than 5 ft.',
 u'EFG_PCT_RANK': 2,
 u'PCT_UAST_FGM_RANK': 5,
 u'FG_PCT': 0.735,
 u'PCT_UAST_FGM': 0.548,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 211,
 u'FG3_PCT': 0.0,
 u'BLKA': 14,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.25,
 u'FGM_RANK': 6,
 u'FGA_RANK': 6,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.25,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'5-9 ft.',
 u'FG3A': 0,
 u'EFG_PCT': 0.267,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 7,
 u'PCT_AST_2PM_RANK': 2,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 4,
 u'FGM': 12,
 u'PCT_AST_FGM_RANK': 5,
 u'PCT_UAST_2PM': 0.75,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 8,
 u'CFPARAMS': u'5-9 ft.',
 u'EFG_PCT_RANK': 7,
 u'PCT_UAST_FGM_RANK': 3,
 u'FG_PCT': 0.267,
 u'PCT_UAST_FGM': 0.75,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 45,
 u'FG3_PCT': 0.0,
 u'BLKA': 6,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.222,
 u'FGM_RANK': 5,
 u'FGA_RANK': 4,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.222,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'10-14 ft.',
 u'FG3A': 0,
 u'EFG_PCT': 0.367,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 4,
 u'PCT_AST_2PM_RANK': 3,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 3,
 u'FGM': 18,
 u'PCT_AST_FGM_RANK': 6,
 u'PCT_UAST_2PM': 0.778,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 7,
 u'CFPARAMS': u'10-14 ft.',
 u'EFG_PCT_RANK': 6,
 u'PCT_UAST_FGM_RANK': 2,
 u'FG_PCT': 0.367,
 u'PCT_UAST_FGM': 0.778,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 49,
 u'FG3_PCT': 0.0,
 u'BLKA': 2,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.095,
 u'FGM_RANK': 3,
 u'FGA_RANK': 5,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.095,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'15-19 ft.',
 u'FG3A': 0,
 u'EFG_PCT': 0.457,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 3,
 u'PCT_AST_2PM_RANK': 5,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 1,
 u'FGM': 21,
 u'PCT_AST_FGM_RANK': 7,
 u'PCT_UAST_2PM': 0.905,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'15-19 ft.',
 u'EFG_PCT_RANK': 5,
 u'PCT_UAST_FGM_RANK': 1,
 u'FG_PCT': 0.457,
 u'PCT_UAST_FGM': 0.905,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 46,
 u'FG3_PCT': 0.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.429,
 u'FGM_RANK': 3,
 u'FGA_RANK': 3,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 2,
 u'PCT_AST_2PM': 0.167,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'20-24 ft.',
 u'FG3A': 36,
 u'EFG_PCT': 0.46,
 u'PCT_AST_3PM': 0.533,
 u'FG_PCT_RANK': 6,
 u'PCT_AST_2PM_RANK': 4,
 u'FG3M': 15,
 u'PCT_UAST_2PM_RANK': 2,
 u'FGM': 21,
 u'PCT_AST_FGM_RANK': 4,
 u'PCT_UAST_2PM': 0.833,
 u'FG3M_RANK': 2,
 u'PCT_AST_3PM_RANK': 2,
 u'PCT_UAST_3PM': 0.467,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'20-24 ft.',
 u'EFG_PCT_RANK': 4,
 u'PCT_UAST_FGM_RANK': 4,
 u'FG_PCT': 0.339,
 u'PCT_UAST_FGM': 0.571,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 62,
 u'FG3_PCT': 0.417,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 2
 },
 {
 u'PCT_AST_FGM': 0.529,
 u'FGM_RANK': 2,
 u'FGA_RANK': 2,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 1,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'25-29 ft.',
 u'FG3A': 96,
 u'EFG_PCT': 0.531,
 u'PCT_AST_3PM': 0.529,
 u'FG_PCT_RANK': 5,
 u'PCT_AST_2PM_RANK': 6,
 u'FG3M': 34,
 u'PCT_UAST_2PM_RANK': 6,
 u'FGM': 34,
 u'PCT_AST_FGM_RANK': 2,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 1,
 u'PCT_AST_3PM_RANK': 3,
 u'PCT_UAST_3PM': 0.471,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'25-29 ft.',
 u'EFG_PCT_RANK': 3,
 u'PCT_UAST_FGM_RANK': 6,
 u'FG_PCT': 0.354,
 u'PCT_UAST_FGM': 0.471,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 96,
 u'FG3_PCT': 0.354,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 3
 },
 {
 u'PCT_AST_FGM': 1.0,
 u'FGM_RANK': 7,
 u'FGA_RANK': 7,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 3,
 u'GROUP_VALUE': u'30-34 ft.',
 u'FG3A': 5,
 u'EFG_PCT': 0.9,
 u'PCT_AST_3PM': 1.0,
 u'FG_PCT_RANK': 2,
 u'PCT_AST_2PM_RANK': 6,
 u'FG3M': 3,
 u'PCT_UAST_2PM_RANK': 6,
 u'FGM': 3,
 u'PCT_AST_FGM_RANK': 1,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 3,
 u'PCT_AST_3PM_RANK': 1,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'30-34 ft.',
 u'EFG_PCT_RANK': 1,
 u'PCT_UAST_FGM_RANK': 7,
 u'FG_PCT': 0.6,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 5,
 u'FG3_PCT': 0.6,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 1
 },
 {
 u'PCT_AST_FGM': 0.0,
 u'FGM_RANK': 8,
 u'FGA_RANK': 8,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'35-39 ft.',
 u'FG3A': 0,
 u'EFG_PCT': 0.0,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 8,
 u'PCT_AST_2PM_RANK': 6,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 6,
 u'FGM': 0,
 u'PCT_AST_FGM_RANK': 8,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'35-39 ft.',
 u'EFG_PCT_RANK': 8,
 u'PCT_UAST_FGM_RANK': 7,
 u'FG_PCT': 0.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 0,
 u'FG3_PCT': 0.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.0,
 u'FGM_RANK': 8,
 u'FGA_RANK': 8,
 u'CFID': 47,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'40+ ft.',
 u'FG3A': 0,
 u'EFG_PCT': 0.0,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 8,
 u'PCT_AST_2PM_RANK': 6,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 6,
 u'FGM': 0,
 u'PCT_AST_FGM_RANK': 8,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'40+ ft.',
 u'EFG_PCT_RANK': 8,
 u'PCT_UAST_FGM_RANK': 7,
 u'FG_PCT': 0.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGA': 0,
 u'FG3_PCT': 0.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 4
}]

player_shooting_splits.shot_8ft()

player_shooting_splits.shot_areas()

player_shooting_splits = player.PlayerShootingSplits("2544")
print(player_shooting_splits.shot_areas())

[{
 u'PCT_AST_FGM': 0.46,
 u'FGM_RANK': 1,
 u'FGA_RANK': 1,
 u'CFID': 49,
 u'PCT_UAST_3PM_RANK': 4,
 u'PCT_AST_2PM': 0.46,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'Restricted Area',
 u'FG3A': 0,
 u'EFG_PCT': 0.739,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 1,
 u'PCT_AST_2PM_RANK': 1,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 3,
 u'FGM': 150,
 u'PCT_AST_FGM_RANK': 3,
 u'PCT_UAST_2PM': 0.54,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 7,
 u'CFPARAMS': u'Restricted Area',
 u'EFG_PCT_RANK': 2,
 u'PCT_UAST_FGM_RANK': 4,
 u'FG_PCT': 0.739,
 u'PCT_UAST_FGM': 0.54,
 u'GROUP_SET': u'Shot Area',
 u'FGA': 203,
 u'FG3_PCT': 0.0,
 u'BLKA': 14,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.25,
 u'FGM_RANK': 4,
 u'FGA_RANK': 4,
 u'CFID': 49,
 u'PCT_UAST_3PM_RANK': 4,
 u'PCT_AST_2PM': 0.25,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'In The Paint (Non-RA)',
 u'FG3A': 0,
 u'EFG_PCT': 0.351,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 5,
 u'PCT_AST_2PM_RANK': 2,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 2,
 u'FGM': 20,
 u'PCT_AST_FGM_RANK': 5,
 u'PCT_UAST_2PM': 0.75,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 6,
 u'CFPARAMS': u'In The Paint (Non-RA)',
 u'EFG_PCT_RANK': 6,
 u'PCT_UAST_FGM_RANK': 2,
 u'FG_PCT': 0.351,
 u'PCT_UAST_FGM': 0.75,
 u'GROUP_SET': u'Shot Area',
 u'FGA': 57,
 u'FG3_PCT': 0.0,
 u'BLKA': 6,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.143,
 u'FGM_RANK': 3,
 u'FGA_RANK': 2,
 u'CFID': 49,
 u'PCT_UAST_3PM_RANK': 4,
 u'PCT_AST_2PM': 0.143,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'Mid-Range',
 u'FG3A': 0,
 u'EFG_PCT': 0.359,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 4,
 u'PCT_AST_2PM_RANK': 3,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 1,
 u'FGM': 42,
 u'PCT_AST_FGM_RANK': 6,
 u'PCT_UAST_2PM': 0.857,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 5,
 u'CFPARAMS': u'Mid-Range',
 u'EFG_PCT_RANK': 5,
 u'PCT_UAST_FGM_RANK': 1,
 u'FG_PCT': 0.359,
 u'PCT_UAST_FGM': 0.857,
 u'GROUP_SET': u'Shot Area',
 u'FGA': 117,
 u'FG3_PCT': 0.0,
 u'BLKA': 2,
 u'FG3_PCT_RANK': 4
 },
 {
 u'PCT_AST_FGM': 0.4,
 u'FGM_RANK': 5,
 u'FGA_RANK': 6,
 u'CFID': 49,
 u'PCT_UAST_3PM_RANK': 1,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 3,
 u'GROUP_VALUE': u'Left Corner 3',
 u'FG3A': 9,
 u'EFG_PCT': 0.833,
 u'PCT_AST_3PM': 0.4,
 u'FG_PCT_RANK': 2,
 u'PCT_AST_2PM_RANK': 4,
 u'FG3M': 5,
 u'PCT_UAST_2PM_RANK': 4,
 u'FGM': 5,
 u'PCT_AST_FGM_RANK': 4,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 2,
 u'PCT_AST_3PM_RANK': 3,
 u'PCT_UAST_3PM': 0.6,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Left Corner 3',
 u'EFG_PCT_RANK': 1,
 u'PCT_UAST_FGM_RANK': 3,
 u'FG_PCT': 0.556,
 u'PCT_UAST_FGM': 0.6,
 u'GROUP_SET': u'Shot Area',
 u'FGA': 9,
 u'FG3_PCT': 0.556,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 1
 },
 {
 u'PCT_AST_FGM': 0.75,
 u'FGM_RANK': 6,
 u'FGA_RANK': 5,
 u'CFID': 49,
 u'PCT_UAST_3PM_RANK': 3,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'Right Corner 3',
 u'FG3A': 12,
 u'EFG_PCT': 0.5,
 u'PCT_AST_3PM': 0.75,
 u'FG_PCT_RANK': 6,
 u'PCT_AST_2PM_RANK': 4,
 u'FG3M': 4,
 u'PCT_UAST_2PM_RANK': 4,
 u'FGM': 4,
 u'PCT_AST_FGM_RANK': 1,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 3,
 u'PCT_AST_3PM_RANK': 1,
 u'PCT_UAST_3PM': 0.25,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Right Corner 3',
 u'EFG_PCT_RANK': 4,
 u'PCT_UAST_FGM_RANK': 6,
 u'FG_PCT': 0.333,
 u'PCT_UAST_FGM': 0.25,
 u'GROUP_SET': u'Shot Area',
 u'FGA': 12,
 u'FG3_PCT': 0.333,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 3
 },
 {
 u'PCT_AST_FGM': 0.558,
 u'FGM_RANK': 2,
 u'FGA_RANK': 3,
 u'CFID': 49,
 u'PCT_UAST_3PM_RANK': 2,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'Above the Break 3',
 u'FG3A': 116,
 u'EFG_PCT': 0.556,
 u'PCT_AST_3PM': 0.558,
 u'FG_PCT_RANK': 3,
 u'PCT_AST_2PM_RANK': 4,
 u'FG3M': 43,
 u'PCT_UAST_2PM_RANK': 4,
 u'FGM': 43,
 u'PCT_AST_FGM_RANK': 2,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 1,
 u'PCT_AST_3PM_RANK': 2,
 u'PCT_UAST_3PM': 0.442,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Above the Break 3',
 u'EFG_PCT_RANK': 3,
 u'PCT_UAST_FGM_RANK': 5,
 u'FG_PCT': 0.371,
 u'PCT_UAST_FGM': 0.442,
 u'GROUP_SET': u'Shot Area',
 u'FGA': 116,
 u'FG3_PCT': 0.371,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 2
 },
 {
 u'PCT_AST_FGM': 0.0,
 u'FGM_RANK': 7,
 u'FGA_RANK': 7,
 u'CFID': 49,
 u'PCT_UAST_3PM_RANK': 4,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'Backcourt',
 u'FG3A': 0,
 u'EFG_PCT': 0.0,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 7,
 u'PCT_AST_2PM_RANK': 4,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 4,
 u'FGM': 0,
 u'PCT_AST_FGM_RANK': 7,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 4,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Backcourt',
 u'EFG_PCT_RANK': 7,
 u'PCT_UAST_FGM_RANK': 7,
 u'FG_PCT': 0.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Area',
 u'FGA': 0,
 u'FG3_PCT': 0.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 4
}]

player_shooting_splits.assisted_shots()

player_shooting_splits = player.PlayerShootingSplits("2544")
print(player_shooting_splits.assisted_shots())

[{
 u'PCT_AST_FGM': 1.0,
 u'FGM_RANK': 2,
 u'FGA_RANK': 2,
 u'CFID': 46,
 u'PCT_UAST_3PM_RANK': 2,
 u'PCT_AST_2PM': 1.0,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'Assisted',
 u'FG3A': 29,
 u'EFG_PCT': 1.133,
 u'PCT_AST_3PM': 1.0,
 u'FG_PCT_RANK': 1,
 u'PCT_AST_2PM_RANK': 1,
 u'FG3M': 29,
 u'PCT_UAST_2PM_RANK': 2,
 u'FGM': 109,
 u'PCT_AST_FGM_RANK': 1,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 1,
 u'PCT_AST_3PM_RANK': 1,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Assisted',
 u'EFG_PCT_RANK': 1,
 u'PCT_UAST_FGM_RANK': 2,
 u'FG_PCT': 1.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Assisted Shot',
 u'FGA': 109,
 u'FG3_PCT': 1.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 1},
 {u'PCT_AST_FGM': 0.0,
 u'FGM_RANK': 1,
 u'FGA_RANK': 1,
 u'CFID': 46,
 u'PCT_UAST_3PM_RANK': 1,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'Unassisted',
 u'FG3A': 23,
 u'EFG_PCT': 1.074,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 1,
 u'PCT_AST_2PM_RANK': 2,
 u'FG3M': 23,
 u'PCT_UAST_2PM_RANK': 1,
 u'FGM': 155,
 u'PCT_AST_FGM_RANK': 2,
 u'PCT_UAST_2PM': 1.0,
 u'FG3M_RANK': 2,
 u'PCT_AST_3PM_RANK': 2,
 u'PCT_UAST_3PM': 1.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Unassisted',
 u'EFG_PCT_RANK': 2,
 u'PCT_UAST_FGM_RANK': 1,
 u'FG_PCT': 1.0,
 u'PCT_UAST_FGM': 1.0,
 u'GROUP_SET': u'Assisted Shot',
 u'FGA': 155,
 u'FG3_PCT': 1.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 1
}]

player_shooting_splits.shot_types_summary()

player_shooting_splits = player.PlayerShootingSplits("2544")
print(player_shooting_splits.shot_types_summary())

[{
 u'PCT_AST_FGM': 1.0,
 u'FG3A': 0,
 u'EFG_PCT': 0.9,
 u'PCT_AST_3PM': 0.0,
 u'CFID': 300,
 u'CFPARAMS': u'Alley Oop',
 u'PCT_UAST_2PM': 0.0,
 u'FG_PCT': 0.9,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 0,
 u'PCT_AST_2PM': 1.0,
 u'FGM': 9,
 u'FG3_PCT': 0.0,
 u'GROUP_VALUE': u'Alley Oop',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 0,
 u'FGA': 10
 },
 {
 u'PCT_AST_FGM': 0.444,
 u'FG3A': 1,
 u'EFG_PCT': 0.594,
 u'PCT_AST_3PM': 1.0,
 u'CFID': 300,
 u'CFPARAMS': u'Bank Shot',
 u'PCT_UAST_2PM': 0.625,
 u'FG_PCT': 0.563,
 u'PCT_UAST_FGM': 0.556,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 1,
 u'PCT_AST_2PM': 0.375,
 u'FGM': 9,
 u'FG3_PCT': 1.0,
 u'GROUP_VALUE': u'Bank Shot',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 0,
 u'FGA': 16
 },
 {
 u'PCT_AST_FGM': 0.617,
 u'FG3A': 0,
 u'EFG_PCT': 0.959,
 u'PCT_AST_3PM': 0.0,
 u'CFID': 300,
 u'CFPARAMS': u'Dunk',
 u'PCT_UAST_2PM': 0.383,
 u'FG_PCT': 0.959,
 u'PCT_UAST_FGM': 0.383,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 0,
 u'PCT_AST_2PM': 0.617,
 u'FGM': 47,
 u'FG3_PCT': 0.0,
 u'GROUP_VALUE': u'Dunk',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 1,
 u'FGA': 49
 },
 {
 u'PCT_AST_FGM': 0.105,
 u'FG3A': 0,
 u'EFG_PCT': 0.442,
 u'PCT_AST_3PM': 0.0,
 u'CFID': 300,
 u'CFPARAMS': u'Fadeaway',
 u'PCT_UAST_2PM': 0.895,
 u'FG_PCT': 0.442,
 u'PCT_UAST_FGM': 0.895,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 0,
 u'PCT_AST_2PM': 0.105,
 u'FGM': 19,
 u'FG3_PCT': 0.0,
 u'GROUP_VALUE': u'Fadeaway',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 0,
 u'FGA': 43
 },
 {
 u'PCT_AST_FGM': 0.25,
 u'FG3A': 0,
 u'EFG_PCT': 0.889,
 u'PCT_AST_3PM': 0.0,
 u'CFID': 300,
 u'CFPARAMS': u'Finger Roll',
 u'PCT_UAST_2PM': 0.75,
 u'FG_PCT': 0.889,
 u'PCT_UAST_FGM': 0.75,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 0,
 u'PCT_AST_2PM': 0.25,
 u'FGM': 8,
 u'FG3_PCT': 0.0,
 u'GROUP_VALUE': u'Finger Roll',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 0,
 u'FGA': 9
 },
 {
 u'PCT_AST_FGM': 0.0,
 u'FG3A': 0,
 u'EFG_PCT': 0.0,
 u'PCT_AST_3PM': 0.0,
 u'CFID': 300,
 u'CFPARAMS': u'Hook Shot',
 u'PCT_UAST_2PM': 0.0,
 u'FG_PCT': 0.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 0,
 u'PCT_AST_2PM': 0.0,
 u'FGM': 0,
 u'FG3_PCT': 0.0,
 u'GROUP_VALUE': u'Hook Shot',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 0,
 u'FGA': 5
 },
 {
 u'PCT_AST_FGM': 0.366,
 u'FG3A': 138,
 u'EFG_PCT': 0.457,
 u'PCT_AST_3PM': 0.558,
 u'CFID': 300,
 u'CFPARAMS': u'Jump Shot',
 u'PCT_UAST_2PM': 0.837,
 u'FG_PCT': 0.363,
 u'PCT_UAST_FGM': 0.634,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 52,
 u'PCT_AST_2PM': 0.163,
 u'FGM': 101,
 u'FG3_PCT': 0.377,
 u'GROUP_VALUE': u'Jump Shot',
 u'PCT_UAST_3PM': 0.442,
 u'BLKA': 10,
 u'FGA': 278
 },
 {
 u'PCT_AST_FGM': 0.408,
 u'FG3A': 0,
 u'EFG_PCT': 0.671,
 u'PCT_AST_3PM': 0.0,
 u'CFID': 300,
 u'CFPARAMS': u'Layup',
 u'PCT_UAST_2PM': 0.592,
 u'FG_PCT': 0.671,
 u'PCT_UAST_FGM': 0.592,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 0,
 u'PCT_AST_2PM': 0.408,
 u'FGM': 98,
 u'FG3_PCT': 0.0,
 u'GROUP_VALUE': u'Layup',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 11,
 u'FGA': 146
 },
 {
 u'PCT_AST_FGM': 0.0,
 u'FG3A': 0,
 u'EFG_PCT': 0.0,
 u'PCT_AST_3PM': 0.0,
 u'CFID': 300,
 u'CFPARAMS': u'Tip Shot',
 u'PCT_UAST_2PM': 0.0,
 u'FG_PCT': 0.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Type Summary',
 u'FG3M': 0,
 u'PCT_AST_2PM': 0.0,
 u'FGM': 0,
 u'FG3_PCT': 0.0,
 u'GROUP_VALUE': u'Tip Shot',
 u'PCT_UAST_3PM': 0.0,
 u'BLKA': 0,
 u'FGA': 1
}]

player_shooting_splits.shot_types_detail()

player_shooting_splits = player.PlayerShootingSplits("2544")
print(player_shooting_splits.shot_types_detail())

[{
 u'PCT_AST_FGM': 1.0,
 u'FGM_RANK': 11,
 u'FGA_RANK': 15,
 u'CFID': 50,
 u'PCT_UAST_3PM_RANK': 4,
 u'PCT_AST_2PM': 1.0,
 u'FG3A_RANK': 5,
 u'GROUP_VALUE': u'Alley Oop Dunk Shot',
 u'FG3A': 0,
 u'EFG_PCT': 1.0,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 1,
 u'PCT_AST_2PM_RANK': 1,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 24,
 u'FGM': 6,
 u'PCT_AST_FGM_RANK': 1,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 5,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Alley Oop Dunk Shot',
 u'EFG_PCT_RANK': 1,
 u'PCT_UAST_FGM_RANK': 24,
 u'FG_PCT': 1.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Shot Type Detail',
 u'FGA': 6,
 u'FG3_PCT': 0.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 5
 },...
 {
 u'PCT_AST_FGM': 0.0,
 u'FGM_RANK': 13,
 u'FGA_RANK': 8,
 u'CFID': 50,
 u'PCT_UAST_3PM_RANK': 4,
 u'PCT_AST_2PM': 0.0,
 u'FG3A_RANK': 5,
 u'GROUP_VALUE': u'Turnaround Jump Shot',
 u'FG3A': 0,
 u'EFG_PCT': 0.333,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT_RANK': 31,
 u'PCT_AST_2PM_RANK': 21,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 1,
 u'FGM': 5,
 u'PCT_AST_FGM_RANK': 23,
 u'PCT_UAST_2PM': 1.0,
 u'FG3M_RANK': 5,
 u'PCT_AST_3PM_RANK': 4,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'Turnaround Jump Shot',
 u'EFG_PCT_RANK': 31,
 u'PCT_UAST_FGM_RANK': 1,
 u'FG_PCT': 0.333,
 u'PCT_UAST_FGM': 1.0,
 u'GROUP_SET': u'Shot Type Detail',
 u'FGA': 15,
 u'FG3_PCT': 0.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 5
}]

player_shooting_splits.assisted_by()

player_shooting_splits = player.PlayerShootingSplits("2544")
print(player_shooting_splits.assisted_by())

[{
 u'PCT_AST_FGM': 1.0,
 u'FGM_RANK': 7,
 u'FGA_RANK': 7,
 u'CFID': 45,
 u'PCT_UAST_3PM_RANK': 1,
 u'PCT_AST_2PM': 1.0,
 u'FG3A_RANK': 9,
 u'PLAYER_ID': 2399,
 u'FG3A': 0,
 u'EFG_PCT': 1.0,
 u'PLAYER_NAME': u'Dunleavy, Mike',
 u'FG_PCT_RANK': 1,
 u'PCT_AST_2PM_RANK': 1,
 u'FG3M': 0,
 u'PCT_UAST_2PM_RANK': 1,
 u'FGM': 3,
 u'PCT_AST_FGM_RANK': 1,
 u'PCT_UAST_FGM_RANK': 1,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 9,
 u'PCT_AST_3PM_RANK': 9,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'2399',
 u'EFG_PCT_RANK': 9,
 u'PCT_AST_3PM': 0.0,
 u'FG_PCT': 1.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Assisted By',
 u'FGA': 3,
 u'FG3_PCT': 0.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 9,
 },...
 {
 u'PCT_AST_FGM': 1.0,
 u'FGM_RANK': 10,
 u'FGA_RANK': 10,
 u'CFID': 45,
 u'PCT_UAST_3PM_RANK': 1,
 u'PCT_AST_2PM': 1.0,
 u'FG3A_RANK': 7,
 u'PLAYER_ID': 202684,
 u'FG3A': 1,
 u'EFG_PCT': 1.25,
 u'PLAYER_NAME': u'Thompson, Tristan',
 u'FG_PCT_RANK': 1,
 u'PCT_AST_2PM_RANK': 1,
 u'FG3M': 1,
 u'PCT_UAST_2PM_RANK': 1,
 u'FGM': 2,
 u'PCT_AST_FGM_RANK': 1,
 u'PCT_UAST_FGM_RANK': 1,
 u'PCT_UAST_2PM': 0.0,
 u'FG3M_RANK': 7,
 u'PCT_AST_3PM_RANK': 1,
 u'PCT_UAST_3PM': 0.0,
 u'BLKA_RANK': 1,
 u'CFPARAMS': u'202684',
 u'EFG_PCT_RANK': 3,
 u'PCT_AST_3PM': 1.0,
 u'FG_PCT': 1.0,
 u'PCT_UAST_FGM': 0.0,
 u'GROUP_SET': u'Assisted By',
 u'FGA': 2,
 u'FG3_PCT': 1.0,
 u'BLKA': 0,
 u'FG3_PCT_RANK': 1
}]
from nba_py import player – player.PlayerPerformanceSplits() – endpoint: playerdashboardbyteamperformance
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_performance_splits.score_differential()

player_performance_splits = player.PlayerPerformanceSplits("2544")
print(player_performance_splits.score_differential())

[{
 u'PF_RANK': 2,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 0.7,
 u'MIN': 37.2,
 u'DREB_RANK': 1,
 u'TOV': 3.7,
 u'TD3': 3,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'W',
 u'REB': 8.3,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': None,
 u'W_RANK': 1,
 u'FG3A': 5.0,
 u'AST': 9.0,
 u'FTM_RANK': 1,
 u'DD2': 13,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 13.4,
 u'FG3M': 1.9,
 u'OREB': 1.5,
 u'L_RANK': 2,
 u'FT_PCT_RANK': 1,
 u'FGM': 9.6,
 u'PF': 1.5,
 u'TD3_RANK': 1,
 u'PTS': 26.0,
 u'FGA': 18.6,
 u'FG3M_RANK': 1,
 u'CFID': 73,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 24,
 u'STL': 1.4,
 u'AST_RANK': 1,
 u'GROUP_VALUE_ORDER': 0,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 7.1,
 u'W': 24,
 u'W_PCT': 1.0,
 u'DREB': 6.8,
 u'FTM': 4.9,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.688,
 u'BLK_RANK': 1,
 u'PFD': 5.6,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.516,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Score Differential',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.383,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 2,
 u'GROUP_VALUE_2': u'All',
 u'BLKA': 0.8,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
 },...
 {
 u'PF_RANK': 2,
 u'FGM_RANK': 8,
 u'FTA_RANK': 1,
 u'BLK': 0.0,
 u'MIN': 33.3,
 u'DREB_RANK': 8,
 u'TOV': 6.0,
 u'TD3': 0,
 u'FG3A_RANK': 5,
 u'GROUP_VALUE': u'L',
 u'REB': 4.5,
 u'DD2_RANK': 6,
 u'REB_RANK': 8,
 u'CFPARAMS': None,
 u'W_RANK': 6,
 u'FG3A': 5.0,
 u'AST': 4.5,
 u'FTM_RANK': 6,
 u'DD2': 0,
 u'W_PCT_RANK': 6,
 u'PLUS_MINUS': -16.0,
 u'FG3M': 1.5,
 u'OREB': 0.5,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 7,
 u'FGM': 6.5,
 u'PF': 2.5,
 u'TD3_RANK': 4,
 u'PTS': 19.0,
 u'FGA': 15.0,
 u'FG3M_RANK': 5,
 u'CFID': 83,
 u'FGA_RANK': 7,
 u'BLKA_RANK': 6,
 u'GP': 2,
 u'STL': 1.0,
 u'AST_RANK': 8,
 u'GROUP_VALUE_ORDER': 4,
 u'L': 2,
 u'PLUS_MINUS_RANK': 8,
 u'FTA': 9.0,
 u'W': 0,
 u'W_PCT': 0.0,
 u'DREB': 4.0,
 u'FTM': 4.5,
 u'PFD_RANK': 3,
 u'FT_PCT': 0.5,
 u'BLK_RANK': 5,
 u'PFD': 5.5,
 u'MIN_RANK': 6,
 u'OREB_RANK': 7,
 u'FG_PCT': 0.433,
 u'STL_RANK': 6,
 u'GROUP_SET': u'Score Differential',
 u'FG3_PCT_RANK': 7,
 u'FG3_PCT': 0.3,
 u'FG_PCT_RANK': 8,
 u'TOV_RANK': 2,
 u'GROUP_VALUE_2': u'16-20 Points ',
 u'BLKA': 0.5,
 u'GP_RANK': 5,
 u'PTS_RANK': 8
}]

player_performance_splits.points_scored()

player_performance_splits = player.PlayerPerformanceSplits("2544")
print(player_performance_splits.points_scored())

[{
 u'PF_RANK': 2,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 0.7,
 u'MIN': 37.2,
 u'DREB_RANK': 1,
 u'TOV': 3.7,
 u'TD3': 3,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'W',
 u'REB': 8.3,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': None,
 u'W_RANK': 1,
 u'FG3A': 5.0,
 u'AST': 9.0,
 u'FTM_RANK': 1,
 u'DD2': 13,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 13.4,
 u'FG3M': 1.9,
 u'OREB': 1.5,
 u'L_RANK': 2,
 u'FT_PCT_RANK': 1,
 u'FGM': 9.6,
 u'PF': 1.5,
 u'TD3_RANK': 1,
 u'PTS': 26.0,
 u'FGA': 18.6,
 u'FG3M_RANK': 1,
 u'CFID': 51,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 24,
 u'STL': 1.4,
 u'AST_RANK': 1,
 u'GROUP_VALUE_ORDER': 0,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 7.1,
 u'W': 24,
 u'W_PCT': 1.0,
 u'DREB': 6.8,
 u'FTM': 4.9,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.688,
 u'BLK_RANK': 1,
 u'PFD': 5.6,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.516,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Points Scored',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.383,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 2,
 u'GROUP_VALUE_2': u'All',
 u'BLKA': 0.8,
 u'GP_RANK': 1,
 u'PTS_RANK': 1
 },...
 {
 u'PF_RANK': 1,
 u'FGM_RANK': 2,
 u'FTA_RANK': 4,
 u'BLK': 0.0,
 u'MIN': 38.1,
 u'DREB_RANK': 3,
 u'TOV': 5.3,
 u'TD3': 0,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'L',
 u'REB': 6.0,
 u'DD2_RANK': 2,
 u'REB_RANK': 3,
 u'CFPARAMS': None,
 u'W_RANK': 3,
 u'FG3A': 5.3,
 u'AST': 7.3,
 u'FTM_RANK': 4,
 u'DD2': 1,
 u'W_PCT_RANK': 3,
 u'PLUS_MINUS': -2.7,
 u'FG3M': 2.0,
 u'OREB': 0.7,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 3,
 u'FGM': 9.7,
 u'PF': 2.7,
 u'TD3_RANK': 2,
 u'PTS': 24.0,
 u'FGA': 18.3,
 u'FG3M_RANK': 1,
 u'CFID': 60,
 u'FGA_RANK': 2,
 u'BLKA_RANK': 3,
 u'GP': 3,
 u'STL': 1.0,
 u'AST_RANK': 2,
 u'GROUP_VALUE_ORDER': 6,
 u'L': 3,
 u'PLUS_MINUS_RANK': 3,
 u'FTA': 4.0,
 u'W': 0,
 u'W_PCT': 0.0,
 u'DREB': 5.3,
 u'FTM': 2.7,
 u'PFD_RANK': 4,
 u'FT_PCT': 0.667,
 u'BLK_RANK': 4,
 u'PFD': 3.7,
 u'MIN_RANK': 2,
 u'OREB_RANK': 4,
 u'FG_PCT': 0.527,
 u'STL_RANK': 3,
 u'GROUP_SET': u'Points Scored',
 u'FG3_PCT_RANK': 2,
 u'FG3_PCT': 0.375,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 1,
 u'GROUP_VALUE_2': u'100+ Points ',
 u'BLKA': 0.7,
 u'GP_RANK': 2,
 u'PTS_RANK': 2
}]

player_performance_splits.points_against()

player_performance_splits = player.PlayerPerformanceSplits("2544")
print(player_performance_splits.points_against())

[{
 u'PF_RANK': 2,
 u'FGM_RANK': 1,
 u'FTA_RANK': 1,
 u'BLK': 0.7,
 u'MIN': 37.2,
 u'DREB_RANK': 1,
 u'TOV': 3.7,
 u'TD3': 3,
 u'FG3A_RANK': 1,
 u'GROUP_VALUE': u'W',
 u'REB': 8.3,
 u'DD2_RANK': 1,
 u'REB_RANK': 1,
 u'CFPARAMS': None,
 u'W_RANK': 1,
 u'FG3A': 5.0,
 u'AST': 9.0,
 u'FTM_RANK': 1,
 u'DD2': 13,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 13.4,
 u'FG3M': 1.9,
 u'OREB': 1.5,
 u'L_RANK': 2,
 u'FT_PCT_RANK': 1,
 u'FGM': 9.6,
 u'PF': 1.5,
 u'TD3_RANK': 1,
 u'PTS': 26.0,
 u'FGA': 18.6,
 u'FG3M_RANK': 1,
 u'CFID': 61,
 u'FGA_RANK': 1,
 u'BLKA_RANK': 1,
 u'GP': 24,
 u'STL': 1.4,
 u'AST_RANK': 1,
 u'GROUP_VALUE_ORDER': 0,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 7.1,
 u'W': 24,
 u'W_PCT': 1.0,
 u'DREB': 6.8,
 u'FTM': 4.9,
 u'PFD_RANK': 1,
 u'FT_PCT': 0.688,
 u'BLK_RANK': 1,
 u'PFD': 5.6,
 u'MIN_RANK': 1,
 u'OREB_RANK': 1,
 u'FG_PCT': 0.516,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Points Against',
 u'FG3_PCT_RANK': 1,
 u'FG3_PCT': 0.383,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 2,
 u'GROUP_VALUE_2': u'All',
 u'BLKA': 0.8,
 u'GP_RANK': 1,
 u'PTS_RANK': 1},
 {u'PF_RANK': 2,
 u'FGM_RANK': 2,
 u'FTA_RANK': 4,
 u'BLK': 0.5,
 u'MIN': 33.6,
 u'DREB_RANK': 3,
 u'TOV': 3.8,
 u'TD3': 1,
 u'FG3A_RANK': 4,
 u'GROUP_VALUE': u'W',
 u'REB': 7.0,
 u'DD2_RANK': 3,
 u'REB_RANK': 2,
 u'CFPARAMS': None,
 u'W_RANK': 3,
 u'FG3A': 3.3,
 u'AST': 8.3,
 u'FTM_RANK': 4,
 u'DD2': 1,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 19.3,
 u'FG3M': 0.5,
 u'OREB': 1.5,
 u'L_RANK': 2,
 u'FT_PCT_RANK': 4,
 u'FGM': 9.8,
 u'PF': 1.8,
 u'TD3_RANK': 2,
 u'PTS': 22.5,
 u'FGA': 16.8,
 u'FG3M_RANK': 4,
 u'CFID': 65,
 u'FGA_RANK': 3,
 u'BLKA_RANK': 4,
 u'GP': 4,
 u'STL': 1.5,
 u'AST_RANK': 2,
 u'GROUP_VALUE_ORDER': 4,
 u'L': 0,
 u'PLUS_MINUS_RANK': 1,
 u'FTA': 4.3,
 u'W': 4,
 u'W_PCT': 1.0,
 u'DREB': 5.5,
 u'FTM': 2.5,
 u'PFD_RANK': 3,
 u'FT_PCT': 0.588,
 u'BLK_RANK': 3,
 u'PFD': 4.8,
 u'MIN_RANK': 4,
 u'OREB_RANK': 2,
 u'FG_PCT': 0.582,
 u'STL_RANK': 1,
 u'GROUP_SET': u'Points Against',
 u'FG3_PCT_RANK': 4,
 u'FG3_PCT': 0.154,
 u'FG_PCT_RANK': 1,
 u'TOV_RANK': 3,
 u'GROUP_VALUE_2': u'80-89 Points',
 u'BLKA': 0.3,
 u'GP_RANK': 3,
 u'PTS_RANK': 2
 },...
 {
 u'PF_RANK': 1,
 u'FGM_RANK': 3,
 u'FTA_RANK': 3,
 u'BLK': 0.0,
 u'MIN': 37.0,
 u'DREB_RANK': 4,
 u'TOV': 5.3,
 u'TD3': 0,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'L',
 u'REB': 5.8,
 u'DD2_RANK': 3,
 u'REB_RANK': 4,
 u'CFPARAMS': None,
 u'W_RANK': 4,
 u'FG3A': 4.5,
 u'AST': 6.8,
 u'FTM_RANK': 3,
 u'DD2': 1,
 u'W_PCT_RANK': 4,
 u'PLUS_MINUS': -7.0,
 u'FG3M': 1.5,
 u'OREB': 0.8,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 3,
 u'FGM': 8.5,
 u'PF': 2.5,
 u'TD3_RANK': 3,
 u'PTS': 22.0,
 u'FGA': 17.3,
 u'FG3M_RANK': 3,
 u'CFID': 72,
 u'FGA_RANK': 2,
 u'BLKA_RANK': 2,
 u'GP': 4,
 u'STL': 1.3,
 u'AST_RANK': 4,
 u'GROUP_VALUE_ORDER': 6,
 u'L': 4,
 u'PLUS_MINUS_RANK': 4,
 u'FTA': 5.8,
 u'W': 0,
 u'W_PCT': 0.0,
 u'DREB': 5.0,
 u'FTM': 3.5,
 u'PFD_RANK': 4,
 u'FT_PCT': 0.609,
 u'BLK_RANK': 4,
 u'PFD': 4.3,
 u'MIN_RANK': 2,
 u'OREB_RANK': 4,
 u'FG_PCT': 0.493,
 u'STL_RANK': 4,
 u'GROUP_SET': u'Points Against',
 u'FG3_PCT_RANK': 3,
 u'FG3_PCT': 0.333,
 u'FG_PCT_RANK': 3,
 u'TOV_RANK': 1,
 u'GROUP_VALUE_2': u'100+ Points ',
 u'BLKA': 0.8,
 u'GP_RANK': 3,
 u'PTS_RANK': 3
}]
from nba_py import player – player.PlayerYearOverYearSplits() – endpoint: playerdashboardbyyearoveryear
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_yearoveryear_splits.by_year()

player_yearoveryear_splits = player.PlayerYearOverYearSplits("2544")
print(player_yearoveryear_splits.by_year())

[{
 u'PF_RANK': 10,
 u'FGM_RANK': 12,
 u'FTA_RANK': 12,
 u'BLK': 0.6,
 u'MIN': 37.1,
 u'DREB_RANK': 2,
 u'TOV': 3.9,
 u'TD3': 3,
 u'FG3A_RANK': 2,
 u'GROUP_VALUE': u'2016-17',
 u'REB': 7.9,
 u'DD2_RANK': 12,
 u'REB_RANK': 3,
 u'CFPARAMS': u'2016-17',
 u'W_RANK': 14,
 u'FG3A': 4.9,
 u'AST': 8.6,
 u'FTM_RANK': 13,
 u'DD2': 14,
 u'W_PCT_RANK': 1,
 u'PLUS_MINUS': 10.5,
 u'FG3M': 1.9,
 u'OREB': 1.4,
 u'L_RANK': 14,
 u'FT_PCT_RANK': 14,
 u'FGM': 9.4,
 u'PF': 1.6,
 u'TD3_RANK': 8,
 u'PTS': 25.4,
 u'FGA': 18.4,
 u'FG3M_RANK': 1,
 u'FGA_RANK': 12,
 u'BLKA_RANK': 6,
 u'GP': 28,
 u'STL': 1.4,
 u'AST_RANK': 1,
 u'CFID': 264,
 u'L': 4,
 u'PLUS_MINUS_RANK': 2,
 u'FTA': 6.9,
 u'W': 24,
 u'W_PCT': 0.857,
 u'DREB': 6.5,
 u'FTM': 4.7,
 u'PFD_RANK': 12,
 u'FT_PCT': 0.679,
 u'BLK_RANK': 13,
 u'PFD': 5.4,
 u'MIN_RANK': 12,
 u'OREB_RANK': 4,
 u'FG_PCT': 0.513,
 u'STL_RANK': 13,
 u'GROUP_SET': u'By Year',
 u'FG3_PCT_RANK': 3,
 u'FG3_PCT': 0.377,
 u'FG_PCT_RANK': 5,
 u'TOV_RANK': 2,
 u'BLKA': 0.8,
 u'GP_RANK': 14,
 u'PTS_RANK': 11
 },...
 {
 u'PF_RANK': 6,
 u'FGM_RANK': 14,
 u'FTA_RANK': 14,
 u'BLK': 0.7,
 u'MIN': 39.6,
 u'DREB_RANK': 14,
 u'TOV': 3.5,
 u'TD3': 0,
 u'FG3A_RANK': 13,
 u'GROUP_VALUE': u'2003-04',
 u'REB': 5.5,
 u'DD2_RANK': 13,
 u'REB_RANK': 14,
 u'CFPARAMS': u'2003-04',
 u'W_RANK': 13,
 u'FG3A': 2.7,
 u'AST': 5.9,
 u'FTM_RANK': 14,
 u'DD2': 12,
 u'W_PCT_RANK': 14,
 u'PLUS_MINUS': -1.8,
 u'FG3M': 0.8,
 u'OREB': 1.3,
 u'L_RANK': 1,
 u'FT_PCT_RANK': 5,
 u'FGM': 7.9,
 u'PF': 1.9,
 u'TD3_RANK': 13,
 u'PTS': 20.9,
 u'FGA': 18.9,
 u'FG3M_RANK': 14,
 u'FGA_RANK': 7,
 u'BLKA_RANK': 1,
 u'GP': 79,
 u'STL': 1.6,
 u'AST_RANK': 14,
 u'CFID': 264,
 u'L': 46,
 u'PLUS_MINUS_RANK': 14,
 u'FTA': 5.8,
 u'W': 33,
 u'W_PCT': 0.418,
 u'DREB': 4.2,
 u'FTM': 4.4,
 u'PFD_RANK': 14,
 u'FT_PCT': 0.754,
 u'BLK_RANK': 7,
 u'PFD': 0.0,
 u'MIN_RANK': 5,
 u'OREB_RANK': 8,
 u'FG_PCT': 0.417,
 u'STL_RANK': 6,
 u'GROUP_SET': u'By Year',
 u'FG3_PCT_RANK': 14,
 u'FG3_PCT': 0.29,
 u'FG_PCT_RANK': 14,
 u'TOV_RANK': 5,
 u'BLKA': 1.0,
 u'GP_RANK': 3,
 u'PTS_RANK': 14
}]
from nba_py import player – player.PlayerCareer() – endpoint: playercareerstats
player_id: "2544" (required),
per_mode: "PerGame" (constants.PerMode.Default),
league_id: "00" (constants.League.Default)

player_career.regular_season_totals()

player_career = player.PlayerCareer("2544")
print(player_career.regular_season_totals())

[{
 u'MIN': 39.5,
 u'TOV': 3.5,
 u'REB': 5.5,
 u'TEAM_ID': 1610612739,
 u'PLAYER_ID': 2544,
 u'FG3A': 2.7,
 u'PLAYER_AGE': 19.0,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': 0.8,
 u'OREB': 1.3,
 u'FGM': 7.9,
 u'PF': 1.9,
 u'PTS': 20.9,
 u'FGA': 18.9,
 u'GS': 79,
 u'GP': 79,
 u'STL': 1.6,
 u'FTA': 5.8,
 u'BLK': 0.7,
 u'DREB': 4.2,
 u'FTM': 4.4,
 u'FT_PCT': 0.754,
 u'SEASON_ID': u'2003-04',
 u'FG_PCT': 0.417,
 u'AST': 5.9,
 u'FG3_PCT': 0.29
 },...
 {
 u'MIN': 37.1,
 u'TOV': 3.9,
 u'REB': 7.9,
 u'TEAM_ID': 1610612739,
 u'PLAYER_ID': 2544,
 u'FG3A': 4.9,
 u'PLAYER_AGE': 32.0,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': 1.9,
 u'OREB': 1.4,
 u'FGM': 9.4,
 u'PF': 1.6,
 u'PTS': 25.4,
 u'FGA': 18.4,
 u'GS': 28,
 u'GP': 28,
 u'STL': 1.4,
 u'FTA': 6.9,
 u'BLK': 0.6,
 u'DREB': 6.5,
 u'FTM': 4.7,
 u'FT_PCT': 0.679,
 u'SEASON_ID': u'2016-17',
 u'FG_PCT': 0.513,
 u'AST': 8.6,
 u'FG3_PCT': 0.377
}]

player_career.regular_season_career_totals()

player_career = player.PlayerCareer("2544")
print(player_career.regular_season_career_totals())

[{
 u'MIN': 38.9,
 u'TOV': 3.4,
 u'REB': 7.2,
 u'PLAYER_ID': 2544,
 u'FG3A': 4.0,
 u'AST': 7.0,
 u'LEAGUE_ID': u'00',
 u'FG3M': 1.4,
 u'OREB': 1.2,
 u'FGM': 9.8,
 u'PF': 1.9,
 u'PTS': 27.1,
 u'FGA': 19.7,
 u'GS': 1014,
 u'GP': 1015,
 u'STL': 1.7,
 u'FTA': 8.3,
 u'BLK': 0.8,
 u'DREB': 6.0,
 u'FTM': 6.2,
 u'FT_PCT': 0.742,
 u'FG_PCT': 0.498,
 u'Team_ID': 0,
 u'FG3_PCT': 0.341
}]

player_career.post_season_totals()

player_career = player.PlayerCareer("2544")
print(player_career.post_season_totals())

[{
 u'MIN': 46.5,
 u'TOV': 5.0,
 u'REB': 8.1,
 u'TEAM_ID': 1610612739,
 u'PLAYER_ID': 2544,
 u'FG3A': 4.8,
 u'PLAYER_AGE': 21.0,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': 1.6,
 u'OREB': 1.7,
 u'FGM': 11.2,
 u'PF': 3.4,
 u'PTS': 30.8,
 u'FGA': 23.6,
 u'GS': 13,
 u'GP': 13,
 u'STL': 1.4,
 u'FTA': 9.1,
 u'BLK': 0.7,
 u'DREB': 6.4,
 u'FTM': 6.7,
 u'FT_PCT': 0.737,
 u'SEASON_ID': u'2005-06',
 u'FG_PCT': 0.476,
 u'AST': 5.8,
 u'FG3_PCT': 0.333
 },...
 {
 u'MIN': 39.1,
 u'TOV': 3.6,
 u'REB': 9.5,
 u'TEAM_ID': 1610612739,
 u'PLAYER_ID': 2544,
 u'FG3A': 4.5,
 u'PLAYER_AGE': 31.0,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG3M': 1.5,
 u'OREB': 2.0,
 u'FGM': 10.4,
 u'PF': 2.6,
 u'PTS': 26.3,
 u'FGA': 19.9,
 u'GS': 21,
 u'GP': 21,
 u'STL': 2.3,
 u'FTA': 5.9,
 u'BLK': 1.3,
 u'DREB': 7.5,
 u'FTM': 3.9,
 u'FT_PCT': 0.661,
 u'SEASON_ID': u'2015-16',
 u'FG_PCT': 0.525,
 u'AST': 7.6,
 u'FG3_PCT': 0.34
}]

player_career.post_season_career_totals()

player_career = player.PlayerCareer("2544")
print(player_career.post_season_career_totals())

[{
 u'MIN': 42.1,
 u'TOV': 3.5,
 u'REB': 8.8,
 u'PLAYER_ID': 2544,
 u'FG3A': 4.5,
 u'AST': 6.8,
 u'LEAGUE_ID': u'00',
 u'FG3M': 1.4,
 u'OREB': 1.6,
 u'FGM': 9.9,
 u'PF': 2.4,
 u'PTS': 28.0,
 u'FGA': 20.7,
 u'GS': 199,
 u'GP': 199,
 u'STL': 1.8,
 u'FTA': 9.1,
 u'BLK': 0.9,
 u'DREB': 7.2,
 u'FTM': 6.8,
 u'FT_PCT': 0.746,
 u'FG_PCT': 0.478,
 u'Team_ID': 0,
 u'FG3_PCT': 0.321
}]

player_career.all_star_season_totals()

player_career = player.PlayerCareer("2544")
print(player_career.all_star_season_totals())

[{
 u'MIN': 31.0,
 u'TOV': 3.0,
 u'REB': 8.0,
 u'TEAM_ID': 1610616833,
 u'PLAYER_ID': 2544,
 u'FG3A': 4.0,
 u'PLAYER_AGE': 20.0,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'EST',
 u'FG3M': 1.0,
 u'OREB': 1.0,
 u'FGM': 6.0,
 u'PF': 0.0,
 u'PTS': 13.0,
 u'FGA': 13.0,
 u'GS': 1,
 u'GP': 1,
 u'STL': 2.0,
 u'FTA': 1.0,
 u'BLK': 0.0,
 u'DREB': 7.0,
 u'FTM': 0.0,
 u'FT_PCT': 0.0,
 u'SEASON_ID': u'2004-05',
 u'FG_PCT': 0.462,
 u'AST': 6.0,
 u'FG3_PCT': 0.25
 },...
 {
 u'MIN': 20.2,
 u'TOV': 4.0,
 u'REB': 4.0,
 u'TEAM_ID': 1610616833,
 u'PLAYER_ID': 2544,
 u'FG3A': 5.0,
 u'PLAYER_AGE': 31.0,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'EST',
 u'FG3M': 1.0,
 u'OREB': 0.0,
 u'FGM': 6.0,
 u'PF': 0.0,
 u'PTS': 13.0,
 u'FGA': 13.0,
 u'GS': 1,
 u'GP': 1,
 u'STL': 0.0,
 u'FTA': 0.0,
 u'BLK': 0.0,
 u'DREB': 4.0,
 u'FTM': 0.0,
 u'FT_PCT': 0.0,
 u'SEASON_ID': u'2015-16',
 u'FG_PCT': 0.462,
 u'AST': 7.0,
 u'FG3_PCT': 0.2
}]

player_career.college_season_totals()

player_career = player.PlayerCareer("2544")
print(player_career.college_season_totals())

[]

player_career.college_season_career_totals()

player_career = player.PlayerCareer("2544")
print(player_career.college_season_career_totals())

[]

player_career.regular_season_rankings()

player_career = player.PlayerCareer("2544")
print(player_career.regular_season_rankings())

[{
 u'RANK_PG_FTA': 13,
 u'RANK_PG_FTM': 20,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 69,
 u'RANK_PG_FG3A': 55,
 u'RANK_PG_REB': 58,
 u'RANK_PG_PTS': 13,
 u'RANK_PG_EFF': 31,
 u'RANK_PG_STL': 13,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 83,
 u'RANK_PG_DREB': 51,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 10,
 u'RANK_FG3_PCT': 92,
 u'SEASON_ID': u'2003-04',
 u'RANK_PG_AST': 13,
 u'RANK_PG_BLK': 51,
 u'RANK_PG_TOV': 5,
 u'RANK_PG_FGM': 10,
 u'RANK_FT_PCT': 73,
 u'RANK_FG_PCT': 90,
 u'RANK_PG_FGA': 5
 },...
 {
 u'RANK_PG_FTA': 20,
 u'RANK_PG_FTM': 20,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 41,
 u'RANK_PG_FG3A': 41,
 u'RANK_PG_REB': 28,
 u'RANK_PG_PTS': 9,
 u'RANK_PG_EFF': 6,
 u'RANK_PG_STL': 25,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 77,
 u'RANK_PG_DREB': 20,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 3,
 u'RANK_FG3_PCT': 57,
 u'SEASON_ID': u'2016-17',
 u'RANK_PG_AST': 5,
 u'RANK_PG_BLK': 65,
 u'RANK_PG_TOV': 4,
 u'RANK_PG_FGM': 5,
 u'RANK_FT_PCT': 97,
 u'RANK_FG_PCT': 24,
 u'RANK_PG_FGA': 5
}]

player_career.post_season_rankings()

player_career = player.PlayerCareer("2544")
print(player_career.post_season_rankings())

[{
 u'RANK_PG_FTA': 8,
 u'RANK_PG_FTM': 8,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 11,
 u'RANK_PG_FG3A': 10,
 u'RANK_PG_REB': 12,
 u'RANK_PG_PTS': 2,
 u'RANK_PG_EFF': 7,
 u'RANK_PG_STL': 12,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 34,
 u'RANK_PG_DREB': 12,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 2,
 u'RANK_FG3_PCT': 43,
 u'SEASON_ID': u'2005-06',
 u'RANK_PG_AST': 7,
 u'RANK_PG_BLK': 30,
 u'RANK_PG_TOV': 1,
 u'RANK_PG_FGM': 1,
 u'RANK_FT_PCT': 53,
 u'RANK_FG_PCT': 26,
 u'RANK_PG_FGA': 1
 },...
 {
 u'RANK_PG_FTA': 16,
 u'RANK_PG_FTM': 16,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 33,
 u'RANK_PG_FG3A': 33,
 u'RANK_PG_REB': 6,
 u'RANK_PG_PTS': 5,
 u'RANK_PG_EFF': 1,
 u'RANK_PG_STL': 5,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 20,
 u'RANK_PG_DREB': 7,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 6,
 u'RANK_FG3_PCT': 35,
 u'SEASON_ID': u'2015-16',
 u'RANK_PG_AST': 3,
 u'RANK_PG_BLK': 16,
 u'RANK_PG_TOV': 5,
 u'RANK_PG_FGM': 1,
 u'RANK_FT_PCT': 46,
 u'RANK_FG_PCT': 6,
 u'RANK_PG_FGA': 1
}]
from nba_py import player – player.PlayerProfile() – endpoint: playerprofilev2
player_id: "2544" (required),
per_mode: "PerGame" (constants.PerMode.Default),
league_id: "00" (constants.League.Default)

player_profile.season_highs()

player_profile = player.PlayerProfile("2544")
print(player_profile.season_highs())

[{
 u'RANK_PG_FTA': 13,
 u'RANK_PG_FTM': 20,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 69,
 u'RANK_PG_FG3A': 55,
 u'RANK_PG_REB': 58,
 u'RANK_PG_PTS': 13,
 u'RANK_PG_EFF': 31,
 u'RANK_PG_STL': 13,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 83,
 u'RANK_PG_DREB': 51,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 10,
 u'RANK_FG3_PCT': 92,
 u'SEASON_ID': u'2003-04',
 u'RANK_PG_AST': 13,
 u'RANK_PG_BLK': 51,
 u'RANK_PG_TOV': 5,
 u'RANK_PG_FGM': 10,
 u'RANK_FT_PCT': 73,
 u'RANK_FG_PCT': 90,
 u'RANK_PG_FGA': 5
 },...
 {
 u'RANK_PG_FTA': 21,
 u'RANK_PG_FTM': 21,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 40,
 u'RANK_PG_FG3A': 40,
 u'RANK_PG_REB': 28,
 u'RANK_PG_PTS': 9,
 u'RANK_PG_EFF': 6,
 u'RANK_PG_STL': 26,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 77,
 u'RANK_PG_DREB': 21,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 3,
 u'RANK_FG3_PCT': 56,
 u'SEASON_ID': u'2016-17',
 u'RANK_PG_AST': 5,
 u'RANK_PG_BLK': 64,
 u'RANK_PG_TOV': 4,
 u'RANK_PG_FGM': 5,
 u'RANK_FT_PCT': 97,
 u'RANK_FG_PCT': 24,
 u'RANK_PG_FGA': 5
}]

player_profile.career_highs()

player_profile = player.PlayerProfile("2544")
print(player_profile.career_highs())

[{
 u'RANK_PG_FTA': 8,
 u'RANK_PG_FTM': 8,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 11,
 u'RANK_PG_FG3A': 10,
 u'RANK_PG_REB': 12,
 u'RANK_PG_PTS': 2,
 u'RANK_PG_EFF': 7,
 u'RANK_PG_STL': 12,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 34,
 u'RANK_PG_DREB': 12,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 2,
 u'RANK_FG3_PCT': 43,
 u'SEASON_ID': u'2005-06',
 u'RANK_PG_AST': 7,
 u'RANK_PG_BLK': 30,
 u'RANK_PG_TOV': 1,
 u'RANK_PG_FGM': 1,
 u'RANK_FT_PCT': 53,
 u'RANK_FG_PCT': 26,
 u'RANK_PG_FGA': 1
 },...
 {
 u'RANK_PG_FTA': 16,
 u'RANK_PG_FTM': 16,
 u'PLAYER_ID': 2544,
 u'TEAM_ID': 1610612739,
 u'RANK_PG_FG3M': 33,
 u'RANK_PG_FG3A': 33,
 u'RANK_PG_REB': 6,
 u'RANK_PG_PTS': 5,
 u'RANK_PG_EFF': 1,
 u'RANK_PG_STL': 5,
 u'LEAGUE_ID': u'00',
 u'TEAM_ABBREVIATION': u'CLE',
 u'PLAYER_AGE': u'NR',
 u'RANK_PG_OREB': 20,
 u'RANK_PG_DREB': 7,
 u'GS': u'NR',
 u'GP': u'NR',
 u'RANK_PG_MIN': 6,
 u'RANK_FG3_PCT': 35,
 u'SEASON_ID': u'2015-16',
 u'RANK_PG_AST': 3,
 u'RANK_PG_BLK': 16,
 u'RANK_PG_TOV': 5,
 u'RANK_PG_FGM': 1,
 u'RANK_FT_PCT': 46,
 u'RANK_FG_PCT': 6,
 u'RANK_PG_FGA': 1
}]

player_profile.next_game()

player_profile = player.PlayerProfile("2544")
print(player_profile.next_game())

[{
 u'DATE_EST': u'2016-12-10T00:00:00',
 u'STAT': u'PTS',
 u'VS_TEAM_NAME': u'Hornets',
 u'VS_TEAM_CITY': u'Charlotte',
 u'GAME_DATE': u'DEC 10 2016',
 u'VS_TEAM_ABBREVIATION': u'CHA',
 u'STAT_ORDER': 1,
 u'PLAYER_ID': 2544,
 u'GAME_ID': u'0021600349',
 u'VS_TEAM_ID': 1610612766,
 u'STAT_VALUE': 44
 },...
 {
 u'DATE_EST': u'2016-12-07T00:00:00',
 u'STAT': u'FTA',
 u'VS_TEAM_NAME': u'Knicks',
 u'VS_TEAM_CITY': u'New York',
 u'GAME_DATE': u'DEC 07 2016',
 u'VS_TEAM_ABBREVIATION': u'NYK',
 u'STAT_ORDER': 13,
 u'PLAYER_ID': 2544,
 u'GAME_ID': u'0021600327',
 u'VS_TEAM_ID': 1610612752,
 u'STAT_VALUE': 14
}]
from nba_py import player – player.PlayerGameLogs() – endpoint: playergamelog
player_id: "2544" (required),
per_mode: "PerGame" (constants.PerMode.Default),
league_id: "00" (constants.League.NBA),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season"

player_game_log.info()

player_game_log = player.PlayerGameLogs("2544")
print(player_game_log.info())

[{
 u'MIN': 44,
 u'WL': u'W',
 u'TOV': 8,
 u'VIDEO_AVAILABLE': 1,
 u'REB': 8,
 u'FG3A': 6,
 u'MATCHUP': u'CLE vs. BOS',
 u'AST': 11,
 u'FG3M': 2,
 u'OREB': 2,
 u'FGM': 9,
 u'PF': 2,
 u'Game_ID': u'0021600488',
 u'PTS': 23,
 u'FGA': 18,
 u'PLUS_MINUS': 1,
 u'STL': 1,
 u'FTA': 7,
 u'Player_ID': 2544,
 u'BLK': 3,
 u'DREB': 6,
 u'FTM': 3,
 u'FT_PCT': 0.429,
 u'SEASON_ID': u'22016',
 u'FG_PCT': 0.5,
 u'FG3_PCT': 0.333,
 u'GAME_DATE': u'DEC 29, 2016'
 },...
 {
 u'MIN': 32,
 u'WL': u'W',
 u'TOV': 4,
 u'VIDEO_AVAILABLE': 1,
 u'REB': 11,
 u'FG3A': 3,
 u'MATCHUP': u'CLE vs. NYK',
 u'AST': 14,
 u'FG3M': 0,
 u'OREB': 3,
 u'FGM': 9,
 u'PF': 3,
 u'Game_ID': u'0021600001',
 u'PTS': 19,
 u'FGA': 14,
 u'PLUS_MINUS': 26,
 u'STL': 0,
 u'FTA': 2,
 u'Player_ID': 2544,
 u'BLK': 1,
 u'DREB': 8,
 u'FTM': 1,
 u'FT_PCT': 0.5,
 u'SEASON_ID': u'22016',
 u'FG_PCT': 0.643,
 u'FG3_PCT': 0.0,
 u'GAME_DATE': u'OCT 25, 2016'
}]
from nba_py import player – player.PlayerShotTracking() – endpoint: playerdashptshots
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_shot_tracking.general_shooting()

player_shot_tracking = player.PlayerShotTracking("2544")
print(player_shot_tracking.general_shooting())

[{
 u'FG3A': 1.86,
 u'FG2A': 0.43,
 u'EFG_PCT': 0.672,
 u'FG3A_FREQUENCY': 0.101,
 u'FG3_PCT': 0.5,
 u'G': 26,
 u'GP': 28,
 u'FG_PCT': 0.469,
 u'FG3M': 0.93,
 u'SHOT_TYPE': u'Catch and Shoot',
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.124,
 u'FGM': 1.07,
 u'FG2_PCT': 0.333,
 u'SORT_ORDER': 1,
 u'FG2M': 0.14,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.023,
 u'FGA': 2.29
 },
 {
 u'FG3A': 2.57,
 u'FG2A': 3.89,
 u'EFG_PCT': 0.387,
 u'FG3A_FREQUENCY': 0.14,
 u'FG3_PCT': 0.278,
 u'G': 27,
 u'GP': 28,
 u'FG_PCT': 0.331,
 u'FG3M': 0.71,
 u'SHOT_TYPE': u'Pull Ups',
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.351,
 u'FGM': 2.14,
 u'FG2_PCT': 0.367,
 u'SORT_ORDER': 2,
 u'FG2M': 1.43,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.212,
 u'FGA': 6.46
 },
 {
 u'FG3A': 0.0,
 u'FG2A': 8.93,
 u'EFG_PCT': 0.668,
 u'FG3A_FREQUENCY': 0.0,
 u'FG3_PCT': None,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.668,
 u'FG3M': 0.0,
 u'SHOT_TYPE': u'Less than 10 ft',
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.485,
 u'FGM': 5.96,
 u'FG2_PCT': 0.668,
 u'SORT_ORDER': 3,
 u'FG2M': 5.96,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.485,
 u'FGA': 8.93
 },
 {
 u'FG3A': 0.5,
 u'FG2A': 0.21,
 u'EFG_PCT': 0.5,
 u'FG3A_FREQUENCY': 0.027,
 u'FG3_PCT': 0.429,
 u'G': 13,
 u'GP': 28,
 u'FG_PCT': 0.35,
 u'FG3M': 0.21,
 u'SHOT_TYPE': u'Other',
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.039,
 u'FGM': 0.25,
 u'FG2_PCT': 0.167,
 u'SORT_ORDER': 4,
 u'FG2M': 0.04,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.012,
 u'FGA': 0.71
}]

player_shot_tracking.shot_clock_shooting()

player_shot_tracking = player.PlayerShotTracking("2544")
print(player_shot_tracking.shot_clock_shooting())

[{
 u'FG3A': 0.04,
 u'FG2A': 0.71,
 u'EFG_PCT': 0.738,
 u'FG3A_FREQUENCY': 0.002,
 u'FG3_PCT': 1.0,
 u'G': 14,
 u'GP': 28,
 u'FG_PCT': 0.714,
 u'FG3M': 0.04,
 u'FG2M': 0.5,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.041,
 u'FGM': 0.54,
 u'FG2_PCT': 0.7,
 u'SORT_ORDER': 1,
 u'PLAYER_ID': 2544,
 u'SHOT_CLOCK_RANGE': u'24-22',
 u'FG2A_FREQUENCY': 0.039,
 u'FGA': 0.75
 },...
 {
 u'FG3A': 0.57,
 u'FG2A': 1.61,
 u'EFG_PCT': 0.443,
 u'FG3A_FREQUENCY': 0.031,
 u'FG3_PCT': 0.25,
 u'G': 5,
 u'GP': 28,
 u'FG_PCT': 0.41,
 u'FG3M': 0.14,
 u'FG2M': 0.75,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.118,
 u'FGM': 0.89,
 u'FG2_PCT': 0.467,
 u'SORT_ORDER': 8,
 u'PLAYER_ID': 2544,
 u'SHOT_CLOCK_RANGE': u'Not Captured',
 u'FG2A_FREQUENCY': 0.087,
 u'FGA': 2.18
}]

player_shot_tracking.dribble_shooting()

player_shot_tracking = player.PlayerShotTracking("2544")
print(player_shot_tracking.dribble_shooting())

[{
 u'FG3A': 2.36,
 u'FG2A': 3.11,
 u'EFG_PCT': 0.706,
 u'FG3A_FREQUENCY': 0.128,
 u'FG3_PCT': 0.485,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.601,
 u'FG3M': 1.14,
 u'FG2M': 2.14,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.297,
 u'FGM': 3.29,
 u'FG2_PCT': 0.69,
 u'SORT_ORDER': 1,
 u'DRIBBLE_RANGE': u'0 Dribbles',
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.169,
 u'FGA': 5.46
 },...
 {
 u'FG3A': 1.04,
 u'FG2A': 3.25,
 u'EFG_PCT': 0.504,
 u'FG3A_FREQUENCY': 0.056,
 u'FG3_PCT': 0.241,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.475,
 u'FG3M': 0.25,
 u'FG2M': 1.79,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.233,
 u'FGM': 2.04,
 u'FG2_PCT': 0.549,
 u'SORT_ORDER': 5,
 u'DRIBBLE_RANGE': u'7+ Dribbles',
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.177,
 u'FGA': 4.29
}]

player_shot_tracking.closest_defender_shooting()

player_shot_tracking = player.PlayerShotTracking("2544")
print(player_shot_tracking.closest_defender_shooting())

[{
 u'FG3A': 0.0,
 u'FG2A': 2.75,
 u'EFG_PCT': 0.558,
 u'FG3A_FREQUENCY': 0.0,
 u'FG3_PCT': None,
 u'G': 24,
 u'GP': 28,
 u'FG_PCT': 0.558,
 u'FG3M': 0.0,
 u'FG2M': 1.54,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.15,
 u'CLOSE_DEF_DIST_RANGE': u'0-2 Feet - Very Tight',
 u'FG2_PCT': 0.558,
 u'SORT_ORDER': 1,
 u'FGM': 1.54,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.15,
 u'FGA': 2.75
 },
 {
 u'FG3A': 0.89,
 u'FG2A': 6.25,
 u'EFG_PCT': 0.543,
 u'FG3A_FREQUENCY': 0.049,
 u'FG3_PCT': 0.2,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.53,
 u'FG3M': 0.18,
 u'FG2M': 3.61,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.388,
 u'CLOSE_DEF_DIST_RANGE': u'2-4 Feet - Tight',
 u'FG2_PCT': 0.577,
 u'SORT_ORDER': 2,
 u'FGM': 3.79,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.34,
 u'FGA': 7.14
 },
 {
 u'FG3A': 2.18,
 u'FG2A': 3.68,
 u'EFG_PCT': 0.546,
 u'FG3A_FREQUENCY': 0.118,
 u'FG3_PCT': 0.41,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.47,
 u'FG3M': 0.89,
 u'FG2M': 1.86,
 u'PLAYER_NAME_LAST_FIRST': u'James,
 LeBron',
 u'FGA_FREQUENCY': 0.318,
 u'CLOSE_DEF_DIST_RANGE': u'4-6 Feet - Open',
 u'FG2_PCT': 0.505,
 u'SORT_ORDER': 3,
 u'FGM': 2.75,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.2,
 u'FGA': 5.86
 },
 {
 u'FG3A': 1.86,
 u'FG2A': 0.79,
 u'EFG_PCT': 0.662,
 u'FG3A_FREQUENCY': 0.101,
 u'FG3_PCT': 0.423,
 u'G': 26,
 u'GP': 28,
 u'FG_PCT': 0.514,
 u'FG3M': 0.79,
 u'FG2M': 0.57,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGA_FREQUENCY': 0.144,
 u'CLOSE_DEF_DIST_RANGE': u'6+ Feet - Wide Open',
 u'FG2_PCT': 0.727,
 u'SORT_ORDER': 4,
 u'FGM': 1.36,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.043,
 u'FGA': 2.64
}]

player_shot_tracking.closest_defender_shooting_long()

player_shot_tracking = player.PlayerShotTracking("2544")
print(player_shot_tracking.closest_defender_shooting_long())

[{
 u'FG3A': 0.0,
 u'FG2A': 0.11,
 u'EFG_PCT': 1.0,
 u'FG3A_FREQUENCY': 0.0,
 u'FG3_PCT': None,
 u'G': 3,
 u'GP': 28,
 u'FG_PCT': 1.0,
 u'FG3M': 0.0,
 u'FG2M': 0.11,
 u'PLAYER_NAME_LAST_FIRST': u'James, Lebron',
 u'FGA_FREQUENCY': 0.006,
 u'CLOSE_DEF_DIST_RANGE': u'0-2 Feet - Very Tight',
 u'FG2_PCT': 1.0,
 u'SORT_ORDER': 1,
 u'FGM': 0.11,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.006,
 u'FGA': 0.11
 },
 {
 u'FG3A': 0.89,
 u'FG2A': 1.68,
 u'EFG_PCT': 0.299,
 u'FG3A_FREQUENCY': 0.049,
 u'FG3_PCT': 0.2,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.264,
 u'FG3M': 0.18,
 u'FG2M': 0.5,
 u'PLAYER_NAME_LAST_FIRST': u'James, Lebron',
 u'FGA_FREQUENCY': 0.14,
 u'CLOSE_DEF_DIST_RANGE': u'2-4 Feet - Tight',
 u'FG2_PCT': 0.298,
 u'SORT_ORDER': 2,
 u'FGM': 0.68,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.091,
 u'FGA': 2.57
 },
 {
 u'FG3A': 2.18,
 u'FG2A': 2.46,
 u'EFG_PCT': 0.481,
 u'FG3A_FREQUENCY': 0.118,
 u'FG3_PCT': 0.41,
 u'G': 27,
 u'GP': 28,
 u'FG_PCT': 0.385,
 u'FG3M': 0.89,
 u'FG2M': 0.89,
 u'PLAYER_NAME_LAST_FIRST': u'James, Lebron',
 u'FGA_FREQUENCY': 0.252,
 u'CLOSE_DEF_DIST_RANGE': u'4-6 Feet - Open',
 u'FG2_PCT': 0.362,
 u'SORT_ORDER': 3,
 u'FGM': 1.79,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.134,
 u'FGA': 4.64
 },
 {
 u'FG3A': 1.86,
 u'FG2A': 0.29,
 u'EFG_PCT': 0.6,
 u'FG3A_FREQUENCY': 0.101,
 u'FG3_PCT': 0.423,
 u'G': 24,
 u'GP': 28,
 u'FG_PCT': 0.417,
 u'FG3M': 0.79,
 u'FG2M': 0.11,
 u'PLAYER_NAME_LAST_FIRST': u'James, Lebron',
 u'FGA_FREQUENCY': 0.117,
 u'CLOSE_DEF_DIST_RANGE': u'6+ Feet - Wide Open',
 u'FG2_PCT': 0.375,
 u'SORT_ORDER': 4,
 u'FGM': 0.89,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.016,
 u'FGA': 2.14
}]

player_shot_tracking.touch_time_shooting()

player_shot_tracking = player.PlayerShotTracking("2544")
print(player_shot_tracking.touch_time_shooting())

[{
 u'FGA': 5.32,
 u'FG3A': 1.89,
 u'FG2A': 3.43,
 u'EFG_PCT': 0.738,
 u'FG3A_FREQUENCY': 0.103,
 u'FG3_PCT': 0.491,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.651,
 u'FG3M': 0.93,
 u'FG2M': 2.54,
 u'PLAYER_NAME_LAST_FIRST': u'James, Lebron',
 u'FGA_FREQUENCY': 0.289,
 u'FGM': 3.46,
 u'FG2_PCT': 0.74,
 u'SORT_ORDER': 1,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.186,
 u'TOUCH_TIME_RANGE': u'Touch < 2 Seconds'
 },
 {
 u'FGA': 7.14,
 u'FG3A': 1.57,
 u'FG2A': 5.57,
 u'EFG_PCT': 0.498,
 u'FG3A_FREQUENCY': 0.085,
 u'FG3_PCT': 0.295,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.465,
 u'FG3M': 0.46,
 u'FG2M': 2.86,
 u'PLAYER_NAME_LAST_FIRST': u'James, Lebron',
 u'FGA_FREQUENCY': 0.388,
 u'FGM': 3.32,
 u'FG2_PCT': 0.513,
 u'SORT_ORDER': 2,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.303,
 u'TOUCH_TIME_RANGE': u'Touch 2-6 Seconds'
 },
 {
 u'FGA': 5.93,
 u'FG3A': 1.46,
 u'FG2A': 4.46,
 u'EFG_PCT': 0.485,
 u'FG3A_FREQUENCY': 0.08,
 u'FG3_PCT': 0.317,
 u'G': 28,
 u'GP': 28,
 u'FG_PCT': 0.446,
 u'FG3M': 0.46,
 u'FG2M': 2.18,
 u'PLAYER_NAME_LAST_FIRST': u'James, Lebron',
 u'FGA_FREQUENCY': 0.322,
 u'FGM': 2.64,
 u'FG2_PCT': 0.488,
 u'SORT_ORDER': 3,
 u'PLAYER_ID': 2544,
 u'FG2A_FREQUENCY': 0.243,
 u'TOUCH_TIME_RANGE': u'Touch 6+ Seconds'
}]
from nba_py import player – player.PlayerReboundTracking() – endpoint: playerdashptreb
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_rebound_tracking.shot_type_rebounding()

player_rebound_tracking = player.PlayerReboundTracking("2544")
print(player_rebound_tracking.shot_type_rebounding())

[{
 u'UC_OREB': 0.0,
 u'G': 28,
 u'SHOT_TYPE_RANGE': u'Miss FTA',
 u'C_OREB': 0.07,
 u'C_DREB': 0.04,
 u'C_REB_PCT': 0.25,
 u'OREB': 0.07,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 0.32,
 u'REB': 0.43,
 u'SORT_ORDER': 1,
 u'C_REB': 0.11,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.054,
 u'DREB': 0.36,
 u'UC_REB_PCT': 0.75,
 u'UC_DREB': 0.32
 },
 {
 u'UC_OREB': 0.18,
 u'G': 28,
 u'SHOT_TYPE_RANGE': u'Miss 2FG',
 u'C_OREB': 0.5,
 u'C_DREB': 0.64,
 u'C_REB_PCT': 0.26,
 u'OREB': 0.68,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 3.25,
 u'REB': 4.39,
 u'SORT_ORDER': 2,
 u'C_REB': 1.14,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.554,
 u'DREB': 3.71,
 u'UC_REB_PCT': 0.74,
 u'UC_DREB': 3.07
 },
 {
 u'UC_OREB': 0.32,
 u'G': 28,
 u'SHOT_TYPE_RANGE': u'Miss 3FG',
 u'C_OREB': 0.32,
 u'C_DREB': 0.32,
 u'C_REB_PCT': 0.207,
 u'OREB': 0.64,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 2.46,
 u'REB': 3.11,
 u'SORT_ORDER': 3,
 u'C_REB': 0.64,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.392,
 u'DREB': 2.46,
 u'UC_REB_PCT': 0.793,
 u'UC_DREB': 2.14
}]

player_rebound_tracking.num_contested_rebounding()

player_rebound_tracking = player.PlayerReboundTracking("2544")
print(player_rebound_tracking.num_contested_rebounding())

[{
 u'UC_OREB': 0.5,
 u'REB_NUM_CONTESTING_RANGE': u'0 Contesting Rebounders',
 u'G': 28,
 u'C_OREB': 0.0,
 u'C_DREB': 0.0,
 u'C_REB_PCT': 0.0,
 u'OREB': 0.5,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 6.04,
 u'REB': 6.04,
 u'SORT_ORDER': 1,
 u'C_REB': 0.0,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.761,
 u'DREB': 5.54,
 u'UC_REB_PCT': 1.0,
 u'UC_DREB': 5.54
 },
 {
 u'UC_OREB': 0.0,
 u'REB_NUM_CONTESTING_RANGE': u'1 Contesting Rebounder',
 u'G': 28,
 u'C_OREB': 0.71,
 u'C_DREB': 0.89,
 u'C_REB_PCT': 1.0,
 u'OREB': 0.71,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 0.0,
 u'REB': 1.61,
 u'SORT_ORDER': 2,
 u'C_REB': 1.61,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.203,
 u'DREB': 0.89,
 u'UC_REB_PCT': 0.0,
 u'UC_DREB': 0.0
 },
 {
 u'UC_OREB': 0.0,
 u'REB_NUM_CONTESTING_RANGE': u'2+ Contesting Rebounders',
 u'G': 28,
 u'C_OREB': 0.18,
 u'C_DREB': 0.11,
 u'C_REB_PCT': 1.0,
 u'OREB': 0.18,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 0.0,
 u'REB': 0.29,
 u'SORT_ORDER': 3,
 u'C_REB': 0.29,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.036,
 u'DREB': 0.11,
 u'UC_REB_PCT': 0.0,
 u'UC_DREB': 0.0}]

player_rebound_tracking.shot_distance_rebounding()

player_rebound_tracking = player.PlayerReboundTracking("2544")
print(player_rebound_tracking.shot_distance_rebounding())

[{
 u'UC_OREB': 0.07,
 u'G': 28,
 u'C_OREB': 0.29,
 u'C_DREB': 0.25,
 u'C_REB_PCT': 0.395,
 u'OREB': 0.36,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 0.82,
 u'REB': 1.36,
 u'SHOT_DIST_RANGE': u'0-6 Feet',
 u'SORT_ORDER': 1,
 u'C_REB': 0.54,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.171,
 u'DREB': 1.0,
 u'UC_REB_PCT': 0.605,
 u'UC_DREB': 0.75
 },
 {
 u'UC_OREB': 0.07,
 u'G': 28,
 u'C_OREB': 0.14,
 u'C_DREB': 0.21,
 u'C_REB_PCT': 0.233,
 u'OREB': 0.21,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 1.18,
 u'REB': 1.54,
 u'SHOT_DIST_RANGE': u'7-13 Feet',
 u'SORT_ORDER': 2,
 u'C_REB': 0.36,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.194,
 u'DREB': 1.32,
 u'UC_REB_PCT': 0.767,
 u'UC_DREB': 1.11
 },
 {
 u'UC_OREB': 0.0,
 u'G': 28,
 u'C_OREB': 0.14,
 u'C_DREB': 0.11,
 u'C_REB_PCT': 0.2,
 u'OREB': 0.14,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 1.0,
 u'REB': 1.25,
 u'SHOT_DIST_RANGE': u'13-19 Feet',
 u'SORT_ORDER': 3,
 u'C_REB': 0.25,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.158,
 u'DREB': 1.11,
 u'UC_REB_PCT': 0.8,
 u'UC_DREB': 1.0
 },
 {
 u'UC_OREB': 0.36,
 u'G': 28,
 u'C_OREB': 0.32,
 u'C_DREB': 0.43,
 u'C_REB_PCT': 0.198,
 u'OREB': 0.68,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'UC_REB': 3.04,
 u'REB': 3.79,
 u'SHOT_DIST_RANGE': u'19+ Feet',
 u'SORT_ORDER': 4,
 u'C_REB': 0.75,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.477,
 u'DREB': 3.11,
 u'UC_REB_PCT': 0.802,
 u'UC_DREB': 2.68
}]

player_rebound_tracking.rebound_distance_rebounding()

player_rebound_tracking = player.PlayerReboundTracking("2544")
print(player_rebound_tracking.rebound_distance_rebounding())

[{
 u'UC_OREB': 0.04,
 u'G': 28,
 u'C_OREB': 0.39,
 u'C_DREB': 0.39,
 u'C_REB_PCT': 0.44,
 u'OREB': 0.43,
 u'PLAYER_NAME_LAST_FIRST': u'James,
 LeBron',
 u'UC_REB': 1.0,
 u'REB': 1.79,
 u'SORT_ORDER': 1,
 u'REB_DIST_RANGE': u'0-3 Feet',
 u'C_REB': 0.79,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.225,
 u'DREB': 1.36,
 u'UC_REB_PCT': 0.56,
 u'UC_DREB': 0.96
 },
 {
 u'UC_OREB': 0.07,
 u'G': 28,
 u'C_OREB': 0.25,
 u'C_DREB': 0.46,
 u'C_REB_PCT': 0.294,
 u'OREB': 0.32,
 u'PLAYER_NAME_LAST_FIRST': u'James,
 LeBron',
 u'UC_REB': 1.71,
 u'REB': 2.43,
 u'SORT_ORDER': 2,
 u'REB_DIST_RANGE': u'3-6 Feet',
 u'C_REB': 0.71,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.306,
 u'DREB': 2.11,
 u'UC_REB_PCT': 0.706,
 u'UC_DREB': 1.64
 },
 {
 u'UC_OREB': 0.0,
 u'G': 28,
 u'C_OREB': 0.25,
 u'C_DREB': 0.14,
 u'C_REB_PCT': 0.177,
 u'OREB': 0.25,
 u'PLAYER_NAME_LAST_FIRST': u'James,
 LeBron',
 u'UC_REB': 1.82,
 u'REB': 2.21,
 u'SORT_ORDER': 3,
 u'REB_DIST_RANGE': u'6-10 Feet',
 u'C_REB': 0.39,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.279,
 u'DREB': 1.96,
 u'UC_REB_PCT': 0.823,
 u'UC_DREB': 1.82
 },
 {
 u'UC_OREB': 0.39,
 u'G': 28,
 u'C_OREB': 0.0,
 u'C_DREB': 0.0,
 u'C_REB_PCT': 0.0,
 u'OREB': 0.39,
 u'PLAYER_NAME_LAST_FIRST': u'James,
 LeBron',
 u'UC_REB': 1.5,
 u'REB': 1.5,
 u'SORT_ORDER': 4,
 u'REB_DIST_RANGE': u'10+ Feet',
 u'C_REB': 0.0,
 u'PLAYER_ID': 2544,
 u'REB_FREQUENCY': 0.189,
 u'DREB': 1.11,
 u'UC_REB_PCT': 1.0,
 u'UC_DREB': 1.11
}]
from nba_py import player – player.PlayerPassTracking() – endpoint: playerdashptpass
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_pass_tracking.passes_made()

player_pass_tracking = player.PlayerPassTracking("2544")
print(player_pass_tracking.passes_made())

[{
 u'FGA': 0.14,
 u'FG3A': 0.04,
 u'FG2A': 0.11,
 u'FG_PCT': 0.0,
 u'FG3_PCT': 0.0,
 u'G': 28,
 u'AST': 0.0,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG2_PCT': 0.0,
 u'FG2M': 0.0,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGM': 0.0,
 u'TEAM_ID': 1610612739,
 u'FREQUENCY': 0.007,
 u'FG3M': 0.0,
 u'PASS': 0.43,
 u'PLAYER_ID': 2544,
 u'PASS_TEAMMATE_PLAYER_ID': 1627770,
 u'TEAM_NAME': u'Cleveland Cavaliers',
 u'PASS_TO': u'Felder, Kay',
 u'PASS_TYPE': u'made'
 },...
 {
 u'FGA': 1.39,
 u'FG3A': 0.75,
 u'FG2A': 0.64,
 u'FG_PCT': 0.385,
 u'FG3_PCT': 0.19,
 u'G': 28,
 u'AST': 0.5,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG2_PCT': 0.611,
 u'FG2M': 0.39,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGM': 0.54,
 u'TEAM_ID': 1610612739,
 u'FREQUENCY': 0.064,
 u'FG3M': 0.14,
 u'PASS': 3.64,
 u'PLAYER_ID': 2544,
 u'PASS_TEAMMATE_PLAYER_ID': 2210,
 u'TEAM_NAME': u'Cleveland Cavaliers',
 u'PASS_TO': u'Jefferson, Richard',
 u'PASS_TYPE': u'made'
}]

player_pass_tracking.passes_received()

player_pass_tracking = player.PlayerPassTracking("2544")
print(player_pass_tracking.passes_received())

[{
 u'FG3A': 0.11,
 u'FG2A': 0.11,
 u'PASS_FROM': u'Felder, Kay',
 u'FG3_PCT': 0.333,
 u'G': 28,
 u'AST': 0.0,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG2_PCT': 0.333,
 u'FG2M': 0.04,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGM': 0.07,
 u'TEAM_ID': 1610612739,
 u'FREQUENCY': 0.012,
 u'FG3M': 0.04,
 u'PASS': 0.82,
 u'PLAYER_ID': 2544,
 u'PASS_TEAMMATE_PLAYER_ID': 1627770,
 u'TEAM_NAME': u'Cleveland Cavaliers',
 u'FG_PCT': 0.333,
 u'FGA': 0.21,
 u'PASS_TYPE': u'received'
 },...
 {
 u'FG3A': 0.25,
 u'FG2A': 1.04,
 u'PASS_FROM': u'Jefferson, Richard',
 u'FG3_PCT': 0.286,
 u'G': 28,
 u'AST': 0.29,
 u'TEAM_ABBREVIATION': u'CLE',
 u'FG2_PCT': 0.586,
 u'FG2M': 0.61,
 u'PLAYER_NAME_LAST_FIRST': u'James, LeBron',
 u'FGM': 0.68,
 u'TEAM_ID': 1610612739,
 u'FREQUENCY': 0.075,
 u'FG3M': 0.07,
 u'PASS': 5.18,
 u'PLAYER_ID': 2544,
 u'PASS_TEAMMATE_PLAYER_ID': 2210,
 u'TEAM_NAME': u'Cleveland Cavaliers',
 u'FG_PCT': 0.528,
 u'FGA': 1.29,
 u'PASS_TYPE': u'received'
}]
from nba_py import player – player.PlayerDefenseTracking() – endpoint: playerdashptshotdefend
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

no available functions yet

from nba_py import player – player.PlayerShotLogTracking() – endpoint: playerdashptshotlog
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

no available functions yet

from nba_py import player – player.PlayerReboundLogTracking() – endpoint: playerdashptreboundlogs
player_id: "2544" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

no available functions yet

from nba_py import player – player.PlayervsPlayer() – endpoint: playervsplayer
player_id: "2544" (required),
vs_player_id: "201939" (required),
team_id: 0 (default),
measure_type: "Base" (constants.MeasureType.Default),
per_mode: "PerGame" (constants.PerMode.Default),
plus_minus: "N" (constants.PlusMinus.Default),
pace_adjust: "N" (constants.PaceAdjust.Default),
rank: "N" (constants.PaceAdjust.Default),
league_id: "00" (constants.League.Default),
season: "2016-17" (constants.CURRENT_SEASON),
season_type: "Regular Season" (constants.SeasonType.Default),
po_round: "0" (constants.PlayoffRound.Default),
outcome: "" (constants.Outcome.Default),
location: "" (constants.Location.Default),
month: "0" (constants.Month.Default),
season_segment: "" (constants.SeasonSegment.Default),
date_from: "" (constants.DateFrom.Default),
date_to: "" (constants.DateTo.Default),
opponent_team_id: "0" (constants.OpponentTeamID.Default),
vs_conference: "" (constants.VsConference.Default),
vs_division: "" (constants.VsDivision.Default),
game_segment: "" (constants.GameSegment.Default),
period: "" (constants.Period.Default),
shot_clock_range: "" (constants.ShotClockRange.Default),
last_n_games: "0" (constants.LastNGames.Default)

player_vs_player.overall()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.overall())

[{
 u'BLK': 0.6,
 u'MIN': 37.1,
 u'TOV': 3.9,
 u'REB': 7.9,
 u'GROUP_VALUE': u'LeBron James',
 u'PLAYER_ID': 2544,
 u'FG3A': 4.9,
 u'PLAYER_NAME': u'LeBron James',
 u'AST': 8.6,
 u'PLUS_MINUS': 10.5,
 u'FG3M': 1.9,
 u'OREB': 1.4,
 u'FGM': 9.4,
 u'PF': 1.6,
 u'PTS': 25.4,
 u'FGA': 18.4,
 u'GP': 28,
 u'STL': 1.4,
 u'CFPARAMS': u'LeBron James',
 u'L': 4,
 u'FTA': 6.9,
 u'W': 24,
 u'W_PCT': 0.857,
 u'DREB': 6.5,
 u'FTM': 4.7,
 u'FT_PCT': 0.679,
 u'PFD': 5.4,
 u'FG_PCT': 0.513,
 u'CFID': 85,
 u'GROUP_SET': u'Overall',
 u'FG3_PCT': 0.377,
 u'BLKA': 0.8
 },
 {
 u'BLK': 0.1,
 u'MIN': 33.2,
 u'TOV': 2.7,
 u'REB': 4.2,
 u'GROUP_VALUE': u'Stephen Curry',
 u'PLAYER_ID': 201939,
 u'FG3A': 9.2,
 u'PLAYER_NAME': u'Stephen Curry',
 u'AST': 5.9,
 u'PLUS_MINUS': 12.4,
 u'FG3M': 3.7,
 u'OREB': 0.6,
 u'FGM': 7.8,
 u'PF': 2.5,
 u'PTS': 23.9,
 u'FGA': 16.7,
 u'GP': 34,
 u'STL': 1.7,
 u'CFPARAMS': u'Stephen Curry',
 u'L': 5,
 u'FTA': 5.0,
 u'W': 29,
 u'W_PCT': 0.853,
 u'DREB': 3.6,
 u'FTM': 4.7,
 u'FT_PCT': 0.936,
 u'PFD': 3.9,
 u'FG_PCT': 0.466,
 u'CFID': 85,
 u'GROUP_SET': u'Overall',
 u'FG3_PCT': 0.403,
 u'BLKA': 0.6
}]

player_vs_player.on_off_court()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.on_off_court())

[{
 u'BLK': 1.0,
 u'MIN': 34.8,
 u'VS_PLAYER_ID': 201939,
 u'TOV': 5.0,
 u'VS_PLAYER_NAME': u'Curry,
 Stephen',
 u'REB': 10.0,
 u'PLAYER_ID': 2544,
 u'FG3A': 7.0,
 u'PLAYER_NAME': u'LeBron James',
 u'AST': 2.0,
 u'PLUS_MINUS': 5.0,
 u'FG3M': 4.0,
 u'OREB': 3.0,
 u'FGM': 12.0,
 u'PF': 2.0,
 u'PTS': 30.0,
 u'FGA': 20.0,
 u'GP': 1,
 u'STL': 2.0,
 u'CFPARAMS': u'201939',
 u'L': 0,
 u'FTA': 5.0,
 u'W': 1,
 u'W_PCT': 1.0,
 u'DREB': 7.0,
 u'FTM': 2.0,
 u'FT_PCT': 0.4,
 u'PFD': 4.0,
 u'FG_PCT': 0.6,
 u'CFID': 86,
 u'GROUP_SET': u'Vs. Player',
 u'FG3_PCT': 0.571,
 u'COURT_STATUS': u'On',
 u'BLKA': 1.0
 },
 {
 u'BLK': 0.0,
 u'MIN': 5.4,
 u'VS_PLAYER_ID': 201939,
 u'TOV': 0.0,
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'REB': 3.0,
 u'PLAYER_ID': 2544,
 u'FG3A': 1.0,
 u'PLAYER_NAME': u'LeBron James',
 u'AST': 2.0,
 u'PLUS_MINUS': -1.0,
 u'FG3M': 0.0,
 u'OREB': 2.0,
 u'FGM': 0.0,
 u'PF': 0.0,
 u'PTS': 1.0,
 u'FGA': 2.0,
 u'GP': 1,
 u'STL': 0.0,
 u'CFPARAMS': u'201939',
 u'L': 0,
 u'FTA': 2.0,
 u'W': 1,
 u'W_PCT': 1.0,
 u'DREB': 1.0,
 u'FTM': 1.0,
 u'FT_PCT': 0.5,
 u'PFD': 2.0,
 u'FG_PCT': 0.0,
 u'CFID': 87,
 u'GROUP_SET': u'Vs. Player',
 u'FG3_PCT': 0.0,
 u'COURT_STATUS': u'Off',
 u'BLKA': 0.0
}]

player_vs_player.shot_distance_overall()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.shot_distance_overall())

[{
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.735,
 u'CFID': 127,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 5.5,
 u'GROUP_VALUE': u'Less Than 5 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 7.5
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.267,
 u'CFID': 128,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 0.4,
 u'GROUP_VALUE': u'5-9 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 1.6
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.367,
 u'CFID': 129,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 0.6,
 u'GROUP_VALUE': u'10-14 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 1.8
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.457,
 u'CFID': 130,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 0.8,
 u'GROUP_VALUE': u'15-19 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 1.6
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.339,
 u'CFID': 131,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 0.8,
 u'GROUP_VALUE': u'20-24 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 2.2
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.354,
 u'CFID': 132,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 1.2,
 u'GROUP_VALUE': u'25-29 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 3.4
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.6,
 u'CFID': 133,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 0.3,
 u'GROUP_VALUE': u'30-34 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 0.4
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.0,
 u'CFID': 134,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'35-39 ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.0,
 u'CFID': 135,
 u'GROUP_SET': u'Shot Distance (5ft)',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'40+ ft.',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
}]

player_vs_player.shot_distance_on_court()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.shot_distance_on_court())

[{
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.615,
 u'CFID': 118,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 8.0,
 u'GROUP_VALUE': u'Less Than 5 ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 13.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 119,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'5-9 ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 120,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'10-14 ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 121,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'15-19 ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.5,
 u'CFID': 122,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 1.0,
 u'GROUP_VALUE': u'20-24 ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 2.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.6,
 u'CFID': 123,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 3.0,
 u'GROUP_VALUE': u'25-29 ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 5.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 124,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'30-34 ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 126,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'40+ ft.',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
}]

player_vs_player.shot_distance_off_court()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.shot_distance_off_court())

[{
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 109,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Less Than 5 ft.',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 1.0
 },
 {u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 110,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'5-9 ft.',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 111,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'10-14 ft.',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 112,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'15-19 ft.',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 113,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'20-24 ft.',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 1.0
 },
 {u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 114,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'25-29 ft.',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
}]

player_vs_player.shot_area_overall()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.shot_area_overall())

[{
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.739,
 u'CFID': 102,
 u'GROUP_SET': u'Shot Area',
 u'FGM': 5.4,
 u'GROUP_VALUE': u'Restricted Area',
 u'PLAYER_ID': 2544,
 u'FGA': 7.3
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.351,
 u'CFID': 103,
 u'GROUP_SET': u'Shot Area',
 u'FGM': 0.7,
 u'GROUP_VALUE': u'In The Paint (Non-RA)',
 u'PLAYER_ID': 2544,
 u'FGA': 2.0
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.359,
 u'CFID': 104,
 u'GROUP_SET': u'Shot Area',
 u'FGM': 1.5,
 u'GROUP_VALUE': u'Mid-Range',
 u'PLAYER_ID': 2544,
 u'FGA': 4.2
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.556,
 u'CFID': 105,
 u'GROUP_SET': u'Shot Area',
 u'FGM': 0.2,
 u'GROUP_VALUE': u'Left Corner 3',
 u'PLAYER_ID': 2544,
 u'FGA': 0.3
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.333,
 u'CFID': 106,
 u'GROUP_SET': u'Shot Area',
 u'FGM': 0.1,
 u'GROUP_VALUE': u'Right Corner 3',
 u'PLAYER_ID': 2544,
 u'FGA': 0.4
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.371,
 u'CFID': 107,
 u'GROUP_SET': u'Shot Area',
 u'FGM': 1.5,
 u'GROUP_VALUE': u'Above the Break 3',
 u'PLAYER_ID': 2544,
 u'FGA': 4.1
 },
 {
 u'CFPARAMS': None,
 u'PLAYER_NAME': u'LeBron James',
 u'FG_PCT': 0.0,
 u'CFID': 108,
 u'GROUP_SET': u'Shot Area',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Backcourt',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
}]

player_vs_player.shot_area_on_court()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.shot_area_on_court())

[{
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.615,
 u'CFID': 95,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 8.0,
 u'GROUP_VALUE': u'Restricted Area',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 13.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 96,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'In The Paint (Non-RA)',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 97,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Mid-Range',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 98,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Left Corner 3',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 1.0,
 u'CFID': 99,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 1.0,
 u'GROUP_VALUE': u'Right Corner 3',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 1.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.5,
 u'CFID': 100,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 3.0,
 u'GROUP_VALUE': u'Above the Break 3',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 6.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 101,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Backcourt',
 u'COURT_STATUS': u'On',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
}]

player_vs_player.shot_area_off_court()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.shot_area_off_court())

[{
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 88,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Restricted Area',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 1.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 89,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'In The Paint (Non-RA)',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 90,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Mid-Range',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 91,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Left Corner 3',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 92,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Right Corner 3',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 1.0
 },
 {
 u'CFPARAMS': u'201939',
 u'PLAYER_NAME': u'LeBron James',
 u'VS_PLAYER_ID': 201939,
 u'FG_PCT': 0.0,
 u'CFID': 93,
 u'GROUP_SET': u'Vs. Player',
 u'VS_PLAYER_NAME': u'Curry, Stephen',
 u'FGM': 0.0,
 u'GROUP_VALUE': u'Above the Break 3',
 u'COURT_STATUS': u'Off',
 u'PLAYER_ID': 2544,
 u'FGA': 0.0
}]

player_vs_player.player_info()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.player_info())

[{
 u'FIRST_NAME': u'LeBron',
 u'LAST_NAME': u'James',
 u'COUNTRY': u'USA',
 u'DISPLAY_FIRST_LAST': u'LeBron James',
 u'SCHOOL': u'St. Vincent-St. Mary HS (OH)',
 u'BIRTHDATE': u'1984-12-30T00:00:00',
 u'DISPLAY_FI_LAST': u'L. James',
 u'PERSON_ID': 2544,
 u'DISPLAY_LAST_COMMA_FIRST': u'James, LeBron',
 u'LAST_AFFILIATION': u'St. Vincent-St. Mary HS (OH)/USA'
}]

player_vs_player.vs_player_info()

player_vs_player = player.PlayerVsPlayer("2544", "201939")
print(player_vs_player.vs_player_info())

[{
 u'FIRST_NAME': u'Stephen',
 u'LAST_NAME': u'Curry',
 u'COUNTRY': u'USA',
 u'DISPLAY_FIRST_LAST': u'Stephen Curry',
 u'SCHOOL': u'Davidson',
 u'BIRTHDATE': u'1988-03-14T00:00:00',
 u'DISPLAY_FI_LAST': u'S. Curry',
 u'PERSON_ID': 201939,
 u'DISPLAY_LAST_COMMA_FIRST': u'Curry,
 Stephen',
 u'LAST_AFFILIATION': u'Davidson/USA'
}]

 

team

For the following player related endpoints, you have to put from nba_py import team.

The rest of the examples will be added on a future date. I’m exhausted!

For now, refer to the official documentation. It doesn’t have any examples though!

How to Copy to System Clipboard from Vim

In this tutorial, I used Cygwin on Windows 10 and Bash on Windows 10 to copy text from vim to the system clipboard for pasting.

  1. Check if we have +clipboard on our version of vim
  2. If you’re using bash on Windows or Ubuntu, and vim does not have +clipboard, sudo apt-get install vim-gnome -y
  3. +clipboard gets installed
  4. vim file
  5. Type: :%y+ to copy all lines
  6. Right click and paste, and you’ll see the lines you copied from vim

 

Check if we have +clipboard on our version of vim.

vim --version

Instead of -clipboard, we want +clipboard.

 

If you’re using bash or Ubuntu, and vim does not have +clipboard already:

sudo apt-get install vim-gnome -y

 

+clipboard gets installed.

vim --version

 

Open the file with vim and copy its contents to the clipboard.

vim file

Type:

:%y+

to yank all lines.

 

Now, you can right click and paste into a text editor.

I pasted the clipboard to an empty document in Sublime!

How to Script Interactive Programs or TUIs on Python with pexpect

If I had a interactive program or shell like bash, how do I automate and script what I want to do with Python?

There’s a useful pip module called pexpect that you can install.

The idea of pexpect originated from a programming language called Expect that automates interactions with programs that expose a text terminal like ftp, ssh, etc.

Think of any program that opens a session that you have to exit!

Prerequisites

  1. Python 2.7 or Python 3.3 or above
  2. pip install pexpect
  3. If you get lost, read the documentation.

Now, that you have installed pexpect, we can make a simple program as an example.

 

bash example. Sending one command.

Let’s say that I wanted to automate a new session of bash and use ls.

bash works a little differently than other interactive programs since it has a flag that allows input.

  1. You spawn the interactive program with pexpect.spawn("/bin/bash -c ls").
  2. You expect what comes after the command like \r\n (meaning new line) or the next command you know you’ll send.
  3. child.before is all the output before what we expect. We can print or use it in an if clause.

 

ssh example. Knowing what exactly we’re expecting. Sending multiple commands.

bash was a special example since the program allows input with its -c flag.

What if the program doesn’t have such a flag?

Let’s say that I wanted to automate a command on another machine with ssh.

Not just one command. Multiple commands.

Manual
  1. ssh into the machine.
  2. Create a file called slothparadise with touch.
  3. ls the current folder.

Automated

When we use pexpect to automate the manual process, we take a look at what we expect to happen.

We pinpoint what we will see after the command.

For ssh, it’s easy to see that after each command, we see u[email protected]:~.

We can use regex or in this case, it’s easy to use the word as it is.

 

regex example

You can expect uncertain output with regex.

If you don’t know what regex is, it is short for regular expression, which matches ranges of characters or words.

Let’s use regex with the ssh example.

Instead of expecting [email protected]:~, we give room for expecting other users like [email protected]:~.

Who knows? The user might be on root!

If you’re not familiar with regex, then I recommend to double-check your regex with this website.

The regex detects the highlighted blue.

  1. We create slothparadise2.
  2. We list the contents of the directory with ls

Instead of the word, I used the regex expression, and it works the same as before.

Those are the basics of pexpect! You can expand on these examples, and you’ll be on your way to scripting those tiresome interactive programs with an easy-to-use language like Python!

How to Get a User’s Email Address on Github

There are a lot of people (software engineers,  open source compatriots, coding warriors) who contribute to programming projects on Github.

You may be interested in a certain someone on Github, and you need to contact them! Recruiters? Potential partners?

This is the surest way to find someone’s email through Github!

  1. Find the person’s Github username.
  2. Go to a recent Github project that they’ve contributed.
  3. Check the link of a commit message.
  4. Add .patch to the link, and you’ll see the email they used to git commit.

1) Find the person’s Github username

A little Googling should be fruitful.

google-person-github

 

2) Go to a recent Github project that they’ve contributed

We check out the user’s Repositories tab. Click on the repository on the top of the list.

find-a-github-project

Click on # commits.

go-to-github-commits

 

 

3) Check the link of a commit message

Click on the most recent Github commit, which is also a link.

check-most-recent-commit

The commit link is long and has a hash value at the end.

https://github.com/huyle333/huyle333.github.io/commit/e3db62eb93a71112945fe7319aa01125bc6d10e3

regular-github-link

 

4) Add .patch to the link, and you’ll see the email they used to git commit

At the end of the link, add .patch and refresh the page.

https://github.com/huyle333/huyle333.github.io/commit/e3db62eb93a71112945fe7319aa01125bc6d10e3.patch

patch-github-link

You’ll see a new metadata page with an e-mail at the From: section because most users associate their git commits with an e-mail.

email-on-patch-github-link

Eureka!

Largest Prime Factor

Project Euler is a website with a series of math problems that can be solved with programming. Problem 3 is about finding the largest prime factor of a number.

Although my first impression is that the problem looks simple since I can iterate through the possibilities one by one and find the largest prime factor.

The problem is that we’re finding the largest prime factor!

The largest prime factor of a very large number can be as big as the number itself, and I can run of memory if I test every number one by one!

I need to do something more.

What can we do to speed up the process of finding the largest prime factor?

 

A decent solution

I like to use Python, so I’ll show a decent answer in Python.

def lpf(a):
    b = 2
    while (a > b):
        if (a % b == 0):
            a = a / b;
            b = 2;
        else:
            b += 1;
    print("Largest Prime Factor: %d" % (b))

I start b at 2 because we aren’t considering 1. If there aren’t any factors at all, then the largest prime factor would be the number itself.

The largest prime factor of a prime number is the number itself.

We have to consider composite numbers though.

I know that the condition for finding the largest prime factor of a composite number is that the factor has to be lower than the number that we’re testing.

a = the number
b = largest prime factor
a > b if we're dealing with a composite number.

To check if a big number is divisible by a smaller number, you can check if the division equals 0 with modulo.

a % b == 0

If a is divisible by b, then we can break down a by dividing by b.

Every time we divide a by b, the smaller a becomes a factor of the original a.

We keep redoing this process of dividing the composite numbers by b because we will eventually hit a point where we cannot break down a anymore.

At the point where we find an a that cannot be divided cleanly is when we get the prime number that we’re looking for.

Why does this work? I’ll try to explain as best as I can in text.

We reset b to 2 constantly because b is just a tool to check for a's primality.

If the current a manages to be divisible by a b, we divide the a, and thus, we have to check the new a’s primality.

Let’s say we have 10.

10 % 2 == 0.

Now, let’s break down 10 to 5 because we divide a by the divisible number, b, which happens to be 2.

5 % 2 != 0
5 % 3 != 0
5 % 4 != 0
5 == 5, so here we stop.

5 is the largest prime factor.

If a is not prime, then we break a down by b. To reiterate, b is a tool for us to check primality.

If the a happens to be prime, then we know that the number is the largest prime factor since we’re walking through the problem backwards from larger to smaller prime factors of a.

We break down the root that is a into smaller a's by dividing by b until a is a prime number.

Every a on each division will certainly be a factor of the original a.

Since the while loop checks if every a is prime, we will know that a will eventually be prime. We’re going backwards from the original largest a to smaller and smaller a’s!

We will eventually reach the largest prime factor when a is no longer divisible by any b.

What is the largest prime factor of the number 600851475143 ?

Answer: 6857

Time complexity: log b (n)

How to Fix ^M Characters in Vim

I opened a CSV file in Microsoft Excel. I approved compatibility with macros on a Mac. Then, I opened the same CSV file with vim.

The entire CSV file was reduced to a single line whenever I opened the file with vim.

Something like this:

Number of Sloths,Type^M15,black^M10,brown^M5,blue

m-character-data
Example of the ^M character on every line in vim.

If we try to substitute all the ^M characters, those characters aren’t found!

vim slothparadise.csv

The characters are actually a little different. We use vim‘s substitution for \r.

:%s/\r/\r/g

All the ^M characters should be exchanged to be proper new lines.

How to install Pip as a User

I don’t have root access on this Macintosh that I’m using. How am I supposed to get the pip package manager for Python?

Python comes installed on every Macintosh.

python --version
Python 2.7.10

Step 1) Get easy_install

easy_install is a Python utility for installing certain Python related packages.

You might already have easy_install! To check:

easy_install

If you don’t have easy_install, you can install easy_install for the user.

wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py -O - | python - --user
Installing easy_install script to /Users/.../Library/Python/2.7/bin
Installing easy_install-2.7 script to /Users/.../Library/Python/2.7/bin

Step 2) Install pip as user

easy_install --user pip
Searching for pip
Best match: pip 8.1.2
Adding pip 8.1.2 to easy-install.pth file
Installing pip script to /Users/.../Library/Python/2.7/bin
Installing pip3.5 script to /Users/.../Library/Python/2.7/bin
Installing pip3 script to /Users/.../Library/Python/2.7/bin
Using /Users/.../Library/Python/2.7/lib/python/site-packages
Processing dependencies for pip
Finished processing dependencies for pip

Step 3) pip install –user

You will be able to install pip packages as the user.

pip install --user xlsx2Csv
Collecting xlsx2Csv
Installing collected packages: xlsx2Csv
Successfully installed xlsx2Csv-0.7.2

Let me know if you encounter any problems while installing pip as a user.