Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where is the full_bpb file?
#1
### preliminary imports
import matplotlib.pyplot as plt
from scipy import stats
import pandas as pd
import numpy as np

df_list = []

### get regular season logs
for yr in [2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019]:
    url = 'https://raw.githubusercontent.com/ryurko/nflscrapR-data/master/play_by_play_data/regular_season/reg_pbp_' + str(yr) + '.csv'
    df = pd.read_csv(url,index_col=0,parse_dates=[0])
    df_list.append(df)

### get postseason logs
for yr in [2009,2010,2011,2012,2013,2014,2015,2016,2017,2018]:
    url = 'https://raw.githubusercontent.com/ryurko/nflscrapR-data/master/play_by_play_data/post_season/post_pbp_' + str(yr) + '.csv'
    df = pd.read_csv(url,index_col=0,parse_dates=[0])
    df_list.append(df)  
    
### combine
full_pbp = pd.concat(df_list).reset_index(drop=True)
Output:
C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,167,168,175,176,179,180,183,184,189,190,191,192,204,205,206,232,233,234,239,241,242) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,167,168,169,170,175,176,179,180,183,184,189,190,191,192,195,196,204,205,206,219,220,221,232,233,234,239,241,242) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (37,38,39,42,46,47,167,168,169,170,173,174,175,176,177,178,179,180,183,184,185,186,189,190,191,192,193,194,195,196,199,200,204,205,206,225,226,227,228,232,233,234,239,241,242,245,246,247,250,251) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,167,168,169,170,175,176,179,180,183,184,189,190,191,192,199,200,204,205,206,227,228,232,233,234,239,241,242,250) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (167,168,169,170,179,180,183,184,189,190,191,192,195,196,199,200,204,205,206,227,228,232,233,234,239,241,242,250) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,167,168,169,170,175,176,179,180,183,184,189,190,191,192,204,205,206,227,228,232,233,234,239,241,242) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,167,168,175,176,179,180,183,184,189,190,191,192,204,205,206,227,228,232,233,234,239,241,242) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (167,168,169,170,175,176,179,180,183,184,189,190,191,192,195,196,199,200,204,205,206,227,228,232,233,234,239,241,242) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,167,168,169,170,175,176,179,180,183,184,189,190,191,192,199,200,204,205,206,227,228,232,233,234,239,241,242) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,167,168,169,170,179,180,183,184,189,190,191,192,199,200,201,202,203,204,205,206,208,210,212,227,228,229,230,231,232,233,234,235,237,238,239,241,242,250) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (167,168,169,170,175,176,179,180,183,184,189,190,191,192,195,196,204,205,206,219,220,221,222,223,224,227,228,232,233,234,239,241,242) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (41,175,176,177,178,183,184,185,186,189,190,197,198,201,202,203,208,210,212,219,220,221,222,223,224,227,228,229,230,231,235,237,238) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (41,46,167,168,173,174,177,178,183,184,185,186,199,200,201,202,203,208,210,212,213,214,215,216,217,218,225,226,227,228,229,230,231,235,237,238,250) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (167,168,175,176,183,184,189,190,191,192,227,228) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (173,174,179,180,183,184,199,200,227,228) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (39,42,167,168,179,180,189,190,191,192,199,200,201,202,203,204,205,206,208,210,212,227,228,229,230,231,232,233,234,235,237,238,239,241,242,250) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (41,169,170,175,176,219,220,221,222,223,224,227,228) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (41,173,174,175,176,199,200,227,228) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (169,170,173,174,175,176,177,178,183,184,185,186,199,200,227,228) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name, C:\Users\james\miniconda3\lib\site-packages\IPython\core\interactiveshell.py:3146: DtypeWarning: Columns (42,175,176,181,182,191,192,199,200,208,210,212,227,228,235,237,238,250) have mixed types.Specify dtype option on import or set low_memory=False. has_raised = await self.run_ast_nodes(code_ast.body, cell_name,1 ​
The python program runs with the following output shown above. It does not throw any errors. If it does I have not seen them.

My question is where is the full_pbp file?

I would expect the be in the same directory as the program itself. I ran this code in a jupyter notebook and
there is no full_pbp file. It is just absent.

The output is somewhat cryptic and since it does not throw any errors. I expected it to run normally.


But where is the full_pbp file?

Any help appreciated.

Respectfully,

LZ
I am using python 3.8.2 and Windows 10, 64 bit.
Reply
#2
Okay, I got this. I was very clumsy, full_pbp is there it is just not downloaded. I apologize for the error or stupid question.

Respectfully,

LZ
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020