Intermediate Python for Finance
Kennedy Behrman
Data Engineer, Author, Founder
aapl
aapl
Date |
03/27/2020 |
03/26/2020 |
03/25/2020 |
03/24/2020 |
aapl
Price | |
---|---|
Date | |
03/27/2020 | 247.74 |
03/26/2020 | 258.44 |
03/25/2020 | 245.52 |
03/24/2020 | 246.88 |
aapl
Price | Volume | |
---|---|---|
Date | ||
03/27/2020 | 247.74 | 51054150 |
03/26/2020 | 258.44 | 63140170 |
03/25/2020 | 245.52 | 75900510 |
03/24/2020 | 246.88 | 71882770 |
aapl
Price | Volume | Trend | |
---|---|---|---|
Date | |||
03/27/2020 | 247.74 | 51054150 | Down |
03/26/2020 | 258.44 | 63140170 | Up |
03/25/2020 | 245.52 | 75900510 | Down |
03/24/2020 | 246.88 | 71882770 | Up |
aapl.head()
Price Volumne Trend
Date
03/27/2020 247.74 51054150 Down
03/26/2020 258.44 63140170 Up
03/25/2020 245.52 75900510 Down
03/24/2020 246.88 71882770 Up
03/23/2020 224.37 84188210 Down
aapl.head()
aapl.head(3)
```out
Price Volumne Trend
Date
03/27/2020 247.74 51054150 Down
03/26/2020 258.44 63140170 Up
03/25/2020 245.52 75900510 Down
aapl.tail()
Price Volumne Trend
Date
03/05/2020 292.92 46893220 Down
03/04/2020 302.74 54794570 Up
03/03/2020 289.32 79868850 Down
03/02/2020 298.81 85349340 Up
02/28/2020 273.36 106721200 Down
aapl.describe()
Price Volume
count 21.000000 2.100000e+01
mean 263.715714 7.551468e+07
std 23.360598 1.669757e+07
min 224.370000 4.689322e+07
25% 246.670000 6.409497e+07
50% 258.440000 7.505841e+07
75% 285.340000 8.418821e+07
max 302.740000 1.067212e+08
aapl.describe(include='object')
Trend
count 21
unique 2
top Down
freq 14
aapl.describe(include='all')
Price Volumne Trend
count 21.000000 2.100000e+01 21
unique NaN NaN 2
top NaN NaN Down
freq NaN NaN 14
mean 263.715714 7.551468e+07 NaN
std 23.360598 1.669757e+07 NaN
min 224.370000 4.689322e+07 NaN
25% 246.670000 6.409497e+07 NaN
aapl.describe(include=['float', 'object'])
Price Trend
count 21.000000 21
unique NaN 2
top NaN Down
freq NaN 14
mean 263.715714 NaN
std 23.360598 NaN
min 224.370000 NaN
25% 246.670000 NaN
50% 258.440000 NaN
75% 285.340000 NaN
max 302.740000 NaN
aapl.describe(percentiles=[.1, .5, .9])
Price Volumne
count 21.000000 2.100000e+01
mean 263.715714 7.551468e+07
std 23.360598 1.669757e+07
min 224.370000 4.689322e+07
10% 242.210000 5.479457e+07
50% 258.440000 7.505841e+07
90% 292.920000 1.004233e+08
max 302.740000 1.067212e+08
aapl.describe(exclude='float')
Volumne Trend
count 2.100000e+01 21
unique NaN 2
top NaN Down
freq NaN 14
mean 7.551468e+07 NaN
std 1.669757e+07 NaN
min 4.689322e+07 NaN
25% 6.409497e+07 NaN
Intermediate Python for Finance