<jupyter_start><jupyter_text><jupyter_code>import numpy as np
import pandas as pd
import seaborn as sns


sns.set()
np.__version__

def fetch_financial_data(company='AMZN'):
  
  import pandas_datareader.data as web
  return web.DataReader(name=company, data_source='stooq')
google = fetch_financial_data(company='GOOGL')
google
google.info()
pd.set_option('precision',2)
google.describe()
pd.options.display.float_format = '{:.2f}'.format
google.describe()
google['Close'].plot()
google.head()
google = google.reset_index()
google
google['Month'] = google['Date'].dt.month
google['Year'] = google['Date'].dt.year
google
 google.groupby('Year')['Close'].mean()
 
 google.groupby('Year')['Close'].mean().plot()
google.groupby('Month')['Close'].mean()
google.groupby('Month')['Close'].mean().plot()
google.groupby(['Month','Year'])['Close'].mean()
google.groupby(['Month','Year'])['Close'].mean().plot()
google['Close'].argmax()
google.iloc[[google['Close'].argmax()]]
google.iloc[[47]]
google.iloc[47]
google[['Date','Open','Close','Volume']]

google = google.set_index('Date')
google
google = google.drop(columns=['Year','Month'])
google
google.columns
google.columns = ['Otwarcie','Najwyższy','Najniższy','Zamknięcie','Wolumen']
google<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2109004739336493, 'fraction_numerical': 0.004739336492890996, 'mean_word_length': 8.746153846153845, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '667277', 'license': 'MIT', 'n_tokens_mistral': 449, 'n_tokens_neox': 436, 'n_words': 63, 'path': 'Pandas121.ipynb', 'repo_name': 'mariuszkr33/dw_matrix', 'size': '1266'}