{
"snippets" : [
{
"name" : "pd.set_option",
"code" : [
"import pandas as pd",
"pd.set_option('max_rows',1)",
"pd.set_option('max_columns',100)"
]
},
{
"name" : "matplotlib",
"code" : [
"import matplotlib.pyplot as plt",
"import japanize_matplotlib"
]
},
{
"name" : "初期",
"code" : [
"import pandas as pd",
"import numpy as np",
"import warnings",
"warnings.filterwarnings('ignore')",
"import matplotlib.pyplot as plt",
"%matplotlib inline",
"import seaborn as sns",
"import datetime",
"from tqdm import tqdm_notebook as tqdm",
"import japanize_matplotlib",
"sns.set(font='Yu Gothic')",
"import math"
]
},
{
"name" : "seaborn",
"code" : [
"def sns_countplot(df,columns_name):",
" plt.figure(figsize=(20, 10))",
" sns.countplot(x='{}'.format(columns_name), data = df);",
"",
"def sns_distplot(series):",
" plt.figure(figsize=(20, 10))",
" sns.distplot(series);",
"",
"def sns_regplot(df,series_x,series_y):",
" plt.figure(figsize=(20, 10))",
" sns.regplot(x=series_x, y=series_y);",
"#https://qiita.com/ryo111/items/bf24c8cf508ad90cfe2e",
"def sns_pairplot(df,series_name):",
" sns.pairplot(df,",
" hue='{}'.format(series_name),",
" diag_kind='hist'",
" )",
" plt.grid(True)"
]
},
{
"name" : "DataFrameを綺麗に",
"code" : [
"display(df.style.background_gradient(cmap='summer',low=6.))",
"df.bar(subset=[], color='#d65f5f')",
"#http://sinhrks.hatenablog.com/entry/2015/11/22/202640"
]
}
]
}