text_html_output_1.png
import pandas as pd

df = pd.read_csv('../input/border-crossing-entry-data/Border_Crossing_Entry_Data.csv')
df

df.isnull().sum()

df.duplicated().sum()

df.loc[(df['Port Code'] == 103) | (df['Port Code'] == 3302)]

df.loc[(df['Port Name'] == 'Eastport') & (df['State'] == 'Maine'), 'Port Name'] = 'Eastport Maine'

Date = pd.to_datetime(df['Date'])
Date

df2 = pd.DataFrame(df)
df2

df2['Year'] = Date.dt.year
df2['Month'] = Date.dt.month
df2