text_plain_output_1.png
import pandas as pd

import numpy as np
import pandas as pd
pd.options.mode.chained_assignment = None
DOWN_AT_HALF = -1
TIE_AT_HALF = 0
UP_AT_HALF = 1
df16 = pd.read_csv('../input/2016-17_teamBoxScore.csv')
df17 = pd.read_csv('../input/2017-18_teamBoxScore.csv')

df = pd.concat((df16, df17))

df2 = df[['teamAbbr', 'teamPTS', 'teamPTS1', 'teamPTS2', 'opptPTS', 'opptPTS1', 'opptPTS2']]
df2.loc[:, 'teamPTSH1'] = df2['teamPTS1'] + df['teamPTS2']
df2.loc[:, 'opptPTSH1'] = df2['opptPTS1'] + df['opptPTS2']
df2.loc[:, 'ptdiffH1'] = df2['teamPTSH1'] - df2['opptPTSH1']
df2.loc[:, 'ptdiff'] = df2['teamPTS'] - df2['opptPTS']
df2