GMashtalyar

.

Use df.loc[] and df.iloc[] to select only rows, only columns or both.

https://pandas.pydata.org/Pandas_Cheat_Sheet.pdf

df = read_excel('data.xlsx', parse_dates=['Дата'])
print(df.shape)
print(df.columns)
print(df.index)
print(df.dtypes)
regions = list(df['Отдел'].unique())
filter = df.query('Цена > 50000')
description = df.describe()

MEAN = df.groupby(by='Категория товара').mean()
std = df.groupby(by='Категория товара').std()
del MEAN['Выручка']
del MEAN['Цена']

mean_std = pd.merge(mean, std, how='outer')
mean_std.to_excel('data3.xlsx')

data[‘X’].quantile(0.95)
Data_short = data[data[‘date’].between(X,Y)]

.rolling(10).mean()

data[‘some_Dates’] = pd.to_datetime(data [‘some_Dates’])

filter_datadrame = df.query('Цена > 50000')

Apply to selling price deviations 
data.resample(‘D’).CustomerID.nunique().rolling(10).mean().plot()

T
df.describe().T.head(10)

Style
df.describe().style.highlight_max(color=“darkred”)
df.describe().style.background_gradient(subset=[“mean”, “50%”], cmap=“Reds”)


at_time, between_time
df.between_time(“9:45”, “12:00”)