text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

df = pd.read_csv('../input/bharti-airtel-stock-proce/BHARTIARTL.NS.csv')

df.shape

df.columns

df.sample(5)

df_1 = df.set_index('Date')

df_1.sample(5)

df_1['Rolling 7: 7Days Rolling'] = df_1.High.rolling(7).mean()
df_1['Rolling 30: 30Days Rolling'] = df_1.High.rolling(30).mean()

df_1['Close'].plot(xlim=['2022-02-05', '2022-02-25'], figsize=(12, 5), color='g')
plt.title('Airtel Stock Price in last 20 Days', fontsize=17)