#1 Import the data
- Import data from
Kaggle
, or scrap data by yourself
Jupyter Notebook
: You can quickly write and test code in a step-by-step fashion: on website of Anaconda, try free and use it online.
- import
pandas
, https://elitedatascience.com/python-cheat-sheet, use function of pandas to sort the data
#2 Parser the data
df1 = pd.DataFrame(data_frame, columns = [’Name’,’Wage’,’Value’])
df1[’difference’] = df1[’Value’] - df1[’Wage’]
(17660, 29)
Name | Wage | Value | difference |
75 | K. Mbappé | 230000.0 | 190500000.0 |
180 | E. Haaland | 220000.0 | 148000000.0 |
17 | F. de Jong | 230000.0 | 116500000.0 |
214 | Pedri | 115000.0 | 116000000.0 |
25 | M. Salah | 270000.0 | 115500000.0 |
<Axes: xlabel='Wage', ylabel='Value'>