[Visualization] matplotlib
데이터 출처: https://www.kaggle.com/datasets/yasserh/bitcoin-prices-dataset?resource=download matplotlib tutorial https://matplotlib.org/stable/tutorials/introductory/usage.html In [37]: import matplotlib.pyplot as plt import seaborn as sns # bulit on top of matplotlib import pandas as pd import numpy as np %matplotlib inline In [38]: plt.plot([1,2,3,4,5,6], [9,7,8,2,4,6]) Out[38]: [] axes https://ma..
2023. 1. 22.
[datetime]S7_02_Timestamp
https://pandas.pydata.org/docs/reference/api/pandas.Timestamp.html In [31]: import pandas as pd import datetime as dt In [33]: pd.Timestamp('2023, 3, 30') Out[33]: Timestamp('2023-03-30 00:00:00') In [34]: # Pandas Timestamp pd.Timestamp(dt.datetime(2022, 3, 31, 8, 0, 15,)) Out[34]: Timestamp('2022-03-31 08:00:15') In [35]: # Difference between two dates day_1 = pd.Timestamp('1990, 3, 31, 11') d..
2023. 1. 21.
[datetime]S7_01_datetime
In [11]: # date: define dates only without including time (month, day, year) # datetime : define times and dates together (month, day, year, hour, second, microsecond) import pandas as pd import datetime as dt In [12]: # A date date_ex = dt.date(2022,1,1) date_ex Out[12]: datetime.date(2022, 1, 1) In [13]: type(date_ex) Out[13]: datetime.date In [14]: # Convert it into string to view str(now) Ou..
2023. 1. 21.