Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

12 month movinf average in python for dataframe

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
%matplotlib inline
import seaborn as sns
sns.set(style='darkgrid', context='talk', palette='Dark2')

my_year_month_fmt = mdates.DateFormatter('%m/%y')

data = pd.read_pickle('./data.pkl')
data.head(10)
Source by www.learndatasci.com #
 
PREVIOUS NEXT
Tagged: #month #movinf #average #python #dataframe
ADD COMMENT
Topic
Name
5+1 =