<jupyter_start><jupyter_text>Input Description- ‘min’, ‘ T’ minute- ‘H’ hour- ‘D’ day- ‘B’ business day- ‘W’ week- ‘M’ month- ‘Q’ quarter- ‘A’ year<jupyter_code>sales.loc[:,'Units'].resample('2W').sum()
two_days = sales.loc['2015-2-4': '2015-2-5', 'Units']
two_days<jupyter_output><empty_output><jupyter_text>Manipulate String<jupyter_code>sales['Company'].str.upper()
sales['Product'].str.contains('ware')
sales['Product'].str.contains('ware').sum()
sp500 = pd.read_csv('data/sp500.csv', parse_dates=True, index_col= 'Date')
sp500.head()
sp500['Close'].plot()
sp500['Close'].plot(title='S&P 500')
plt.ylabel('Closing Price (US Dollars)')
sp500.loc['2015-4-1':'2015-5-1', 'Close'].plot(title='S&P 500')
plt.ylabel('Closing Price (US Dollars)')

sp500.loc['2015-4-1':'2015-5-1', 'Close'].plot(style='k.-', title='S&P 500')
plt.ylabel('Closing Price (US Dollars)')<jupyter_output><empty_output><jupyter_text>- color  = k: black, - b: blue , g: green, - r: red ,  c: cyan - marker = . : dot, o: circle, *: star, s: square, +: plus- Line type = -: solid, .: dotted, –: dashed<jupyter_code>sp500['Close'].plot(title='S&P 500', kind = 'area')
plt.ylabel('Closing Price (US Dollars)')
sp500.loc['2015', ['Close', 'Volume']].plot(title='S&P 500', subplots=True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.23538581449727203, 'fraction_numerical': 0.0646921278254092, 'mean_word_length': 6.465116279069767, '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': '85933', 'license': 'MIT', 'n_tokens_mistral': 583, 'n_tokens_neox': 511, 'n_words': 93, 'path': 'Bagian 4 - Fundamental Pandas/3. Indexing Time Series.ipynb', 'repo_name': 'selmakaramy/Data-warehouse', 'size': '1283'}