728x90
In [41]:
import matplotlib.pyplot as plt
import pandas as pd
import datetime
In [49]:
# data
investment_df = pd.read_csv('coin_daily_prices.csv'); investment_df
Out[49]:
Date | BTC-USD Price | ETH-USD Price | LTC-USD Price | |
---|---|---|---|---|
0 | 2013-04-29 23:59 | 134.444000 | NaN | 4.366760 |
1 | 2013-04-30 23:59 | 144.000000 | NaN | 4.403520 |
2 | 2013-05-01 23:59 | 139.000000 | NaN | 4.289540 |
3 | 2013-05-02 23:59 | 116.379997 | NaN | 3.780020 |
4 | 2013-05-03 23:59 | 106.250000 | NaN | 3.390440 |
... | ... | ... | ... | ... |
2986 | 2021-07-02 23:59 | 33549.600180 | 2109.892677 | 137.299274 |
2987 | 2021-07-03 23:59 | 33854.421360 | 2150.835025 | 136.930584 |
2988 | 2021-07-04 23:59 | 34665.564870 | 2226.550382 | 140.317998 |
2989 | 2021-07-05 23:59 | 35284.344430 | 2321.922836 | 144.849333 |
2990 | 2021-07-06 23:59 | 33723.509660 | 2197.919385 | 137.951668 |
2991 rows × 4 columns
In [52]:
investment_df.plot(x = 'Date', title='Cryto Prices', subplots = True, grid =True, figsize = (15,25))
Out[52]:
array([<matplotlib.axes._subplots.AxesSubplot object at 0x7f11989f43a0>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f119897eac0>,
<matplotlib.axes._subplots.AxesSubplot object at 0x7f119896dd30>],
dtype=object)
728x90
'Data Analytics with python > [Data Analysis]' 카테고리의 다른 글
[matplotlib]S5_06_pie_chart (0) | 2023.01.21 |
---|---|
[matplotlib]S5_05_Scatterplot (0) | 2023.01.21 |
[matplotlib]S5_03_Multiple_plots (0) | 2023.01.21 |
[matplotlib]S5_02_yahoo_finance (0) | 2023.01.21 |
[matplotlib]S5_01_single_line_plot (0) | 2023.01.21 |
댓글