<jupyter_start><jupyter_text>Stock Market Google Analysis  Importing libraries<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import datetime
dataset = pd.read_csv('Google_Stock_Price_Train.csv',index_col="Date",parse_dates=True)
dataset.head()
dataset.isna().any()
dataset.info()
dataset.describe()
dataset['Open'].plot(figsize=(16,6))<jupyter_output><empty_output><jupyter_text>'close' and 'volume' columns need to convert to float- removing ',' - converting to float<jupyter_code>dataset_cols = ['Volume', 'Close']
dataset[dataset_cols] = dataset[dataset_cols].replace('[\,,]', '', regex=True).astype(float)
dataset.describe()<jupyter_output><empty_output><jupyter_text>7 day rolling mean<jupyter_code>dataset.rolling(7).mean().head(10)
dataset['Open'].plot(figsize=(16,6))
dataset.rolling(window=30).mean()['Close'].plot()<jupyter_output><empty_output><jupyter_text>Moving Average<jupyter_code>dataset['Close: 30 Day Mean'] = dataset['Close'].rolling(window=30).mean()
dataset[['Close','Close: 30 Day Mean']].plot(figsize=(16,6))<jupyter_output><empty_output><jupyter_text>Optional specify a minimum number of periods<jupyter_code>dataset['Close'].expanding(min_periods=1).mean().plot(figsize=(16,6))
training_set=dataset['Open']
training_set=pd.DataFrame(training_set)
training_set.head()
training_set.to_csv("train.csv")
dataset.to_csv("dataset.csv")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1651440618411806, 'fraction_numerical': 0.017568517217146872, 'mean_word_length': 11.82882882882883, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '594370', 'license': 'MIT', 'n_tokens_mistral': 504, 'n_tokens_neox': 485, 'n_words': 69, 'path': 'Preprocessing .ipynb', 'repo_name': 'srahnama/Stock-Market-Analysis-with-RNN---LSTM', 'size': '1423'}