# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# Dependencies
import pandas as pd
import os

# +
# Save path to data set in a variable

data_file = os.path.join('.', 'Resources', 'nba_contracts_history.csv')

# -

# Use Pandas to read data
data_file_df = pd.read_csv(data_file)
data_file_df

# Display a statistical overview of the DataFrame
data_file_df.describe()

#Finding NAME that has duplicate data by NAME and CONTRACT_START.  (keeping the first record in dupes)
data_file_df[data_file_df.duplicated(subset=["NAME"],keep=False)]
data_file_df_multionly=data_file_df[data_file_df.duplicated(subset=["NAME"],keep=False)]
data_file_df_multionly.sort_values (by=['NAME','CONTRACT_START'], ascending=True)

data_file_df_multionly.to_csv (".\Resources\data_file_df_multionly.csv", index=False, header=True)

# +
# Finding Salary increase
#data_file_df_multionly ["AVG_SALARY"].head()

# +
# Reference multiple columns within a DataFrame
#data_file_df[["AVG_SALARY", "AGE"]].head()
# -













#

#






















#

#













#
#

#
#













#

#
#

















#
#

#







#

#

#















#





StarcoderdataJupyterScriptsDedupFiltered