<jupyter_start><jupyter_text>Numpy Datetime Array<jupyter_code>import numpy as np
np.array(['2016-03-15','2017-05-24','2018-08-09'])
np.array(['2016-03-15','2017-05-24','2018-08-09'],dtype = 'datetime64')
np.array(['2016-03-15','2017-05-24','2018-08-09'],dtype = 'datetime64[h]')
np.array(['2016-03-15','2017-05-24','2018-08-09'],dtype = 'datetime64[Y]')<jupyter_output><empty_output><jupyter_text>Numpy Date Range<jupyter_code>np.arange('2018-06-01','2018-06-23',7,dtype = 'datetime64[D]')
np.arange('1984','2000',dtype = 'datetime64[Y]')<jupyter_output><empty_output><jupyter_text>Pandas Datetime Index<jupyter_code>import pandas as pd
pd.date_range('1/1/2020',periods=7,freq='D')
pd.to_datetime(['19++08++2020','20++08++2020'], format = '%d++%m++%Y')
idx = pd.to_datetime(['Jan 01, 2020','13/08/2020','12-Aug-2020',None])
idx
# Example
data = np.random.randn(3,2)
cols = ['A','B']

data
sample_dates = np.array(['2016-03-15','2017-05-24','2018-08-09'],dtype = 'datetime64[D]')
sample_dates
idx = pd.DatetimeIndex(sample_dates)
idx
df = pd.DataFrame(data,idx,cols)
df
df.index
df.index.max()
df.index.argmax()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2392638036809816, 'fraction_numerical': 0.17703768624014024, 'mean_word_length': 8.136, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '356637', 'license': 'CC0-1.0', 'n_tokens_mistral': 602, 'n_tokens_neox': 481, 'n_words': 51, 'path': 'Online Certificate Course in Data Science and Machine Learning rearranged/10 DateTimeseries/DateTime-05-10-2020-ref.ipynb', 'repo_name': 'jsrikantappa/nielit', 'size': '1141'}