{"id":2190,"date":"2023-01-17T09:27:25","date_gmt":"2023-01-17T09:27:25","guid":{"rendered":"https:\/\/pickl.ai\/blog\/?p=2190"},"modified":"2024-08-22T07:17:06","modified_gmt":"2024-08-22T07:17:06","slug":"time-series-analysis-in-python","status":"publish","type":"post","link":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/","title":{"rendered":"What is Time Series Analysis in Python?"},"content":{"rendered":"<p><b>Summary:<\/b><span style=\"font-weight: 400;\"> Time Series Analysis in Python involves examining data points over time to identify trends and make forecasts. Utilising libraries like Pandas, Matplotlib, and Statsmodels, analysts can visualise data, check for stationarity, and apply various forecasting methods, including ARIMA and machine learning models, to derive meaningful insights from historical data.<\/span><\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Introduction\" >Introduction<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Trend\" >Trend<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Seasonal_Variations\" >Seasonal Variations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Cyclic_Variations\" >Cyclic Variations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Irregular_Variations\" >Irregular Variations<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Stationarity_and_Non-Stationarity_of_Time_Series_Data\" >Stationarity\u00a0 and Non-Stationarity of Time Series Data<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Stationary_Time_Series\" >Stationary Time Series<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Non-Stationary_Time_Series\" >Non-Stationary Time Series<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Methods_To_Check_Stationarity_in_Time_Series_Analysis\" >Methods To Check Stationarity in Time Series Analysis<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Analysing_Time_Series_Data_in_Python\" >Analysing Time Series Data in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Time_Series_Analysis_in_Python\" >Time Series Analysis in Python<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Conclusion\" >Conclusion<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Frequently_Asked_Questions\" >Frequently Asked Questions<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#Can_I_use_deep_learning_for_Time_Series_Analysis_in_Python\" >Can I use deep learning for Time Series Analysis in Python?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#How_can_I_Visualise_Time_Series_Data_in_Python\" >How can I Visualise Time Series Data in Python?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#What_is_the_Difference_Between_ARIMA_and_Seasonal_ARIMA_SARIMA\" >What is the Difference Between ARIMA and Seasonal ARIMA (SARIMA)?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2 id=\"introduction\"><span class=\"ez-toc-section\" id=\"Introduction\"><\/span><b>Introduction<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/pickl.ai\/blog\/time-series-database\/\"><span style=\"font-weight: 400;\">Time series <\/span><\/a><span style=\"font-weight: 400;\">data is the information or the data that is collected over a set period of time. It involves working on the most commonly used data by various organisations and industries.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">By analysing the time series data, one can be able to get various insights, like trends, patterns, etc., from which we can be able to predict the future events. Thus, helping in catalysing the growth of the company.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">There are a few steps that should be taken care of while analysing the time series data. You must be sure that stationarity and autocorrelation are checked and analysed. Stationarity is a way to measure if the data has structural patterns like seasonal trends.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Autocorrelation arises when future values in a Time Series Analysis linearly depend on the previous or historical values. You need to check for both of these i.e., stationarity and autocorrelation in time series data as they are the assumptions that are made by many widely used methods in Time Series Analysis.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The time series data that is collected would be in years, months, days, etc. There are four types of components that are observed in<\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Time_series_analysis\"> <span style=\"font-weight: 400;\">Time Series Analysis<\/span><\/a><span style=\"font-weight: 400;\">. Components of Time Series Analysis in Python are:<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400;\">Trend<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Seasonality<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Cyclical<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Irregularity<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Let us explore the above components in detail!<\/span><\/p>\n<h2 id=\"trend\"><span class=\"ez-toc-section\" id=\"Trend\"><\/span><b>Trend<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">The trend demonstrates the data\u2019s overall tendency to increase or decrease over an extended period of time. One major point to consider is that the trend might increase, decrease, or even be constant in a given period of time, i.e., the overall trend must be upward, downward, or remain constant.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">An increase in the population, the number of education institutions or industries, an increase in the population, or a decrease or increase in demand for a product,a declining death rate, and population growth are some of the examples showing trends.<\/span><\/p>\n<p><b>Linear Trend<\/b><span style=\"font-weight: 400;\">: If the pattern of the data is a straight line, either upward or downward or stable, then it is considered a linear trend.<\/span><\/p>\n<p><b>Non-Linear Trend:<\/b><span style=\"font-weight: 400;\"> If the pattern of the data has curves either upward or downward, then it is considered a non-linear trend.<\/span><\/p>\n<h2 id=\"seasonal-variations\"><span class=\"ez-toc-section\" id=\"Seasonal_Variations\"><\/span><b>Seasonal Variations<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Seasonality is used to find the patterns or variations that occur at regular intervals of time, mostly on a yearly basis.<\/span><a href=\"https:\/\/psychology.fandom.com\/wiki\/Seasonal_variations\"> <span style=\"font-weight: 400;\">Seasonal variations<\/span><\/a><span style=\"font-weight: 400;\"> are the results of both natural and artificial events.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">They usually show the same pattern of upward or downward growth in the 12-month period of the time series. These variations are often recorded on an hourly, daily, weekly, quarterly, and monthly basis. Seasonality can be seen in the increase of room heater sales during the winter, fluctuations in fashion based on festivals and crop dependence on the season.<\/span><\/p>\n<h2 id=\"cyclic-variations\"><span class=\"ez-toc-section\" id=\"Cyclic_Variations\"><\/span><b>Cyclic Variations<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Cyclical changes in a time series are those that persist for a longer period of time, usually more than a year. The oscillation time for this movement is greater than a year. A cycle consists of one full period. This oscillation is commonly referred to as the \u201cbusiness cycle.\u201d<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Prosperity, recession, depression, and recovery are the four phases that are present in the cyclical variation. Strikes, wars, floods, etc., are the examples of cyclical variations<\/span><\/p>\n<h2 id=\"irregular-variations\"><span class=\"ez-toc-section\" id=\"Irregular_Variations\"><\/span><b>Irregular Variations<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Irregular or random variations are the patterns that are observed due to unpredictable or uncontrolled events that happen. As the name suggests, these variations do not follow any kind of regular time period. A rapid decrease in population due to a natural disaster is an example of an irregular variation.\u00a0<\/span><\/p>\n<h2 id=\"stationarity-and-non-stationarity-of-time-series-data\"><span class=\"ez-toc-section\" id=\"Stationarity_and_Non-Stationarity_of_Time_Series_Data\"><\/span><b>Stationarity\u00a0 and Non-Stationarity of Time Series Data<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Stationarity and non-stationarity are key concepts in Time Series Analysis that describe the statistical properties of a time series over time.<\/span><\/p>\n<h3 id=\"stationary-time-series\"><span class=\"ez-toc-section\" id=\"Stationary_Time_Series\"><\/span><b>Stationary Time Series<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">A stationary time series is one whose statistical properties, such as mean, variance, and autocorrelation, remain constant over time. In other words, the distribution of the time series does not change when shifted in time. Some key properties of stationary time series include:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Constant mean and variance over time<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Autocorrelation function (ACF) that drops to zero relatively quickly<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Independence of observations &#8211; each value is uncorrelated with previous values<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">No trends or seasonality<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Stationary time series are easier to model and forecast, as their statistical properties remain stable over time. Many time series forecasting methods assume the underlying data is stationary.<\/span><\/p>\n<h3 id=\"non-stationary-time-series\"><span class=\"ez-toc-section\" id=\"Non-Stationary_Time_Series\"><\/span><b>Non-Stationary Time Series<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">A non-stationary time series is one whose statistical properties change over time. This means the mean, variance, or autocorrelation structure varies with time. Examples of non-stationarity include:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Trends &#8211; increasing\/decreasing mean over time<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Seasonality &#8211; periodic fluctuations in the mean<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Changing variance over time<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Non-stationary time series are more complex to analyse and model, as their statistical properties are not constant. Using non-stationary data in models can lead to spurious results and poor forecasts.<\/span><\/p>\n<p><b>Detecting and Transforming Non-Stationarity<\/b><\/p>\n<p><span style=\"font-weight: 400;\">There are several ways to detect non-stationarity in a time series:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Visually inspect the time plot for trends, seasonality, or changing variance<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Look at the ACF plot &#8211; non-stationary series have ACFs that decrease slowly<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Perform unit root tests like Augmented Dickey-Fuller (ADF) or KPSS test<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Non-stationary series can be transformed to stationarity using techniques like:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Differencing &#8211; taking the difference between consecutive observations<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Detrending &#8211; removing a deterministic trend from the series<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Variance stabilising transformations like logging or power transforms<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">In summary, stationarity is a critical assumption for many time series models. Non-stationary data must be transformed to stationarity to obtain reliable results. Detecting and addressing non-stationarity is a key step in Time Series Analysis.<\/span><\/p>\n<h2 id=\"methods-to-check-stationarity-in-time-series-analysis\"><span class=\"ez-toc-section\" id=\"Methods_To_Check_Stationarity_in_Time_Series_Analysis\"><\/span><b>Methods To Check Stationarity in Time Series Analysis<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">During the Time Series Analysis model preparation process, we must check if the given dataset is stationary or not. In order to check the stationarity, below are a few methods or tests that can be performed.<\/span><\/p>\n<p><b>Statistical Test:<\/b><span style=\"font-weight: 400;\"> To determine if the dataset is stationary or not, there are two statistical tests that can be used. They are,<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Augmented Dickey-Fuller (ADF) Test<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Kwiatkowski-Phillips-Schmidt-Shin (KPSS) Test<\/span><\/li>\n<\/ul>\n<p><b>Augmented Dickey-Fuller (ADF) Test or Unit Root Test:<\/b><span style=\"font-weight: 400;\"> The ADF test is the most popular statistical test with the following assumptions.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Null Hypothesis (H0): Data is non-stationary<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Alternate Hypothesis (HA): Data is stationary<\/span>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">If p-value &gt;0.05 then, fail to reject (H0)<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"2\"><span style=\"font-weight: 400;\">If p-value &lt;= 0.05 , then accept (H1)<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><b>Kwiatkowski\u2013Phillips\u2013Schmidt\u2013Shin (KPSS): <\/b><span style=\"font-weight: 400;\">This test is used for testing a NULL Hypothesis (HO), that will perceive the time-series as stationary around a deterministic trend against the alternative of a unit root. We must ensure that the dataset is steady because Time Series Analysis needs stationary data for its additional analysis.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">A series can be made stationary by various methods like:\u00a0<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Difference Transform<\/b><span style=\"font-weight: 400;\">: Subtracting the previous value with the current value is called differencing. It is done to remove the dependency of values on time. The ADF test can be used to determine whether the differenced series is stationary.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><b>Differencing:<\/b><span style=\"font-weight: 400;\"> If the result of the ADF test on the differenced series shows that the series is still non-stationary, then one can subtract the differenced series again.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Removing trend and seasonality by using HP-filter, or band-pass filters and X12 ARIMA analysis.<\/span><\/li>\n<\/ul>\n<h2 id=\"analysing-time-series-data-in-python\"><span class=\"ez-toc-section\" id=\"Analysing_Time_Series_Data_in_Python\"><\/span><b>Analysing Time Series Data in Python<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">There are a few steps that need to be performed while analysing the time series data. Let us quickly have a look at these steps.<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Collecting the dataset and performing data preprocessing<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Exploring the data using various<\/span><a href=\"https:\/\/pickl.ai\/blog\/best-data-visualization-tools-for-data-enthusiasts\/\"> <span style=\"font-weight: 400;\">visualization tools<\/span><\/a><span style=\"font-weight: 400;\"> with respect to time vs key feature<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Checking for stationarity in the data<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Understanding the nature by creating charts<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Model building \u2013 AR, MA, ARMA and ARIMA<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Extracting insights from prediction<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">So, let\u2019s implement some of the above steps using python.<\/span><\/p>\n<h2 id=\"time-series-analysis-in-python\"><span class=\"ez-toc-section\" id=\"Time_Series_Analysis_in_Python\"><\/span><b>Time Series Analysis in Python<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Now let us see how to perform Time Series Analysis in<\/span><a href=\"https:\/\/pickl.ai\/blog\/how-to-learn-python-for-data-science-in-2023\/\"> <span style=\"font-weight: 400;\">python<\/span><\/a><span style=\"font-weight: 400;\">. Here, we are using the dummy dataset which contains the number of travellers who travelled during a particular month and year.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let us import the required libraries first<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" class=\"size-full wp-image-13191 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1.png\" alt=\"Time Series Analysis in Python\" width=\"408\" height=\"69\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1.png 408w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1-300x51.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1-110x19.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1-200x34.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1-380x64.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1-255x43.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image2-1-150x25.png 150w\" sizes=\"(max-width: 408px) 100vw, 408px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, let us read our dataset using the pandas library. Our dataset is in the form of a CSV (comma-separated values) file:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-13205 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17.png\" alt=\"\" width=\"394\" height=\"158\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17.png 394w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17-300x120.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17-110x44.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17-200x80.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17-380x152.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17-255x102.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image17-150x60.png 150w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, I\u2019m checking the datatype of the features present in the dataset:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img decoding=\"async\" class=\"size-full wp-image-13203 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15.png\" alt=\"Time Series Analysis in Python\" width=\"462\" height=\"71\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15.png 462w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15-300x46.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15-110x17.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15-200x31.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15-380x58.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15-255x39.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image15-150x23.png 150w\" sizes=\"(max-width: 462px) 100vw, 462px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We found that the feature \u2018Month\u2019 is of the object type. So, we need to change it to datetime. Before that, let us check the missing values in the dataset:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13202 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14.png\" alt=\"Time Series Analysis in Python\" width=\"437\" height=\"119\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14.png 437w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14-300x82.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14-110x30.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14-200x54.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14-380x103.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14-255x69.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image14-150x41.png 150w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Checking if there are any null values in the dataset:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13199 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image11.png\" alt=\"Time Series Analysis in Python\" width=\"347\" height=\"262\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image11.png 347w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image11-300x227.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image11-110x83.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image11-200x151.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image11-255x193.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image11-150x113.png 150w\" sizes=\"(max-width: 347px) 100vw, 347px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We found that there are no null values in the dataset. So, we changed the datatype of \u2018Month\u2019 to datetime:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13209 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21.png\" alt=\"Time Series Analysis in Python\" width=\"497\" height=\"145\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21.png 497w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21-300x88.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21-110x32.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21-200x58.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21-380x111.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21-255x74.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image21-150x44.png 150w\" sizes=\"(max-width: 497px) 100vw, 497px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">After performing the data preprocessing and changing the data types, we now need to convert our dataset to the time series data:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13190 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2.png\" alt=\"Time Series Analysis in Python\" width=\"443\" height=\"182\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2.png 443w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2-300x123.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2-110x45.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2-200x82.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2-380x156.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2-255x105.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image1-2-150x62.png 150w\" sizes=\"(max-width: 443px) 100vw, 443px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Next, we are going to visualise our time series data:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13200 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12.png\" alt=\"Time Series Analysis in Python\" width=\"422\" height=\"204\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12.png 422w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12-300x145.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12-110x53.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12-200x97.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12-380x184.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12-255x123.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image12-150x73.png 150w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We have seen that there is a positive trend along with some seasonality in it. We are now checking for stationarity as it is an important step in the Time Series Analysis:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13220 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1.png\" alt=\"Time Series Analysis in Python\" width=\"696\" height=\"242\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1.png 696w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1-300x104.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1-110x38.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1-200x70.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1-380x132.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1-255x89.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1-550x191.png 550w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image4-1-150x52.png 150w\" sizes=\"(max-width: 696px) 100vw, 696px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We have used a dickey-fuller test to check the stationarity. The<\/span><a href=\"https:\/\/en.wikipedia.org\/wiki\/Dickey%E2%80%93Fuller_test\"> <span style=\"font-weight: 400;\">Dickey-Fuller test<\/span><\/a><span style=\"font-weight: 400;\"> is a type of statistical test used to check stationarity in the data:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13206 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18.png\" alt=\"Time Series Analysis in Python\" width=\"735\" height=\"302\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18.png 735w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18-300x123.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18-110x45.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18-200x82.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18-380x156.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18-255x105.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18-550x226.png 550w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image18-150x62.png 150w\" sizes=\"(max-width: 735px) 100vw, 735px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We found that there is no stationarity in the data due to the following reasons:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">The mean is increasing even though the standard deviation is small.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Test Statistics is greater than the critical value.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">So, in order to make it stationarity, we are using logarithmic transformation:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13198 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10.png\" alt=\"Time Series Analysis in Python\" width=\"557\" height=\"221\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10.png 557w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10-300x119.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10-110x44.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10-200x79.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10-380x151.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10-255x101.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10-550x218.png 550w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image10-150x60.png 150w\" sizes=\"(max-width: 557px) 100vw, 557px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We found a positive or forward trend. In order to remove them, we are using the smoothing method. So, let\u2019s use the moving averages method which is a type of smoothing method:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"> <img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13222 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1.png\" alt=\"\" width=\"543\" height=\"224\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1.png 543w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1-300x124.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1-110x45.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1-200x83.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1-380x157.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1-255x105.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image16-1-150x62.png 150w\" sizes=\"(max-width: 543px) 100vw, 543px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, now we need to subtract the rolling mean from the original data.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13201 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13.png\" alt=\"Time Series Analysis in Python\" width=\"472\" height=\"334\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13.png 472w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13-300x212.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13-110x78.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13-200x142.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13-380x269.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13-255x180.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image13-150x106.png 150w\" sizes=\"(max-width: 472px) 100vw, 472px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Now, let\u2019s parse it to check for stationarity:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13197 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9.png\" alt=\"Time Series Analysis in Python\" width=\"512\" height=\"232\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9.png 512w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9-300x136.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9-110x50.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9-200x91.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9-380x172.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9-255x116.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image9-150x68.png 150w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the graph, we observe that there is no specific trend and even the test statistics is smaller than the critical value of 5%. That means, we can say it is stationary:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13208 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20.png\" alt=\"Time Series Analysis in Python\" width=\"436\" height=\"303\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20.png 436w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20-300x208.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20-110x76.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20-200x139.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20-380x264.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20-255x177.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image20-150x104.png 150w\" sizes=\"(max-width: 436px) 100vw, 436px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">In the above process, we took an average of 12 months. But, sometimes, we need to work with a more complex range. The parameter (halflife) is assumed to be 12. Let\u2019s check stationarity now\/<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We found that the above is stationary because the mean and standard deviation have fewer variations. At the same time, the test statistic is smaller than the 1% critical values<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13196 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8.png\" alt=\"Time Series Analysis in Python\" width=\"457\" height=\"219\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8.png 457w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8-300x144.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8-110x53.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8-200x96.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8-380x182.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8-255x122.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image8-150x72.png 150w\" sizes=\"(max-width: 457px) 100vw, 457px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let\u2019s do the differencing now:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13193 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1.png\" alt=\"Time Series Analysis in Python\" width=\"391\" height=\"311\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1.png 391w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1-300x239.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1-110x87.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1-200x159.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1-380x302.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1-255x203.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image5-1-150x119.png 150w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The above looks fine!<\/span><\/p>\n<p><span style=\"font-weight: 400;\">So, now just decompose the data into the components of time series. Here we model both the trend and the seasonality, and then the remaining part of the time series is returned:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13195 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1.png\" alt=\"Time Series Analysis in Python\" width=\"545\" height=\"567\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1.png 545w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1-288x300.png 288w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1-110x114.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1-200x208.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1-380x395.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1-255x265.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1-300x312.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image7-1-150x156.png 150w\" sizes=\"(max-width: 545px) 100vw, 545px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We can now use the residual values after removing the trend and seasonality from the time series. Check stationarity now:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13192 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3.png\" alt=\"Time Series Analysis in Python\" width=\"438\" height=\"266\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3.png 438w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3-300x182.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3-110x67.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3-200x121.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3-380x231.png 380w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3-255x155.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image3-150x91.png 150w\" sizes=\"(max-width: 438px) 100vw, 438px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">The above is stationarity because the test statistic is less than the critical values and the mean, and standard deviation has very few variations with respect to time.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">At last, we are visualising the autocorrelation:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-13194 alignnone\" src=\"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image6-1.png\" alt=\"Time Series Analysis in Python\" width=\"350\" height=\"173\" srcset=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image6-1.png 350w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image6-1-300x148.png 300w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image6-1-110x54.png 110w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image6-1-200x99.png 200w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image6-1-255x126.png 255w, https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image6-1-150x74.png 150w\" sizes=\"(max-width: 350px) 100vw, 350px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400;\">We have seen how to change the original data to time series and checking for stationarity, etc., using python. So, time series analysis in python makes it easy to analyse the time series data without any hassles.<\/span><\/p>\n<h2 id=\"conclusion\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span><b>Conclusion<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Almost every Data Scientist will have to perform time series data analysis at some point in their career. Data Scientists can find trends, foresee occurrences, and subsequently guide decision-making by having a solid understanding of the tools and methodologies for analysis.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Promotional planning can be made more profitable for businesses by using stationarity, autocorrelation, and trend decomposition to understand seasonality patterns.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">In conclusion, using time series forecasting to foresee future events in your time series data can have a big influence on decision-making. Any Data Scientist or Data Science team looking to use time series data to add value to their business will find these kinds of analyses to be extremely helpful.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">I hope you enjoyed the blog. Now, it\u2019s your time to implement the Time Series Analysis!<\/span><\/p>\n<h2 id=\"frequently-asked-questions\"><span class=\"ez-toc-section\" id=\"Frequently_Asked_Questions\"><\/span><b>Frequently Asked Questions<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 id=\"can-i-use-deep-learning-for-time-series-analysis-in-python\"><span class=\"ez-toc-section\" id=\"Can_I_use_deep_learning_for_Time_Series_Analysis_in_Python\"><\/span><b>Can I use deep learning for Time Series Analysis in Python?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Yes, deep learning can be effectively used for Time Series Analysis. Libraries like TensorFlow and Keras provide tools for building neural networks, including recurrent neural networks (RNNs) and long short-term memory (LSTM) networks, which are particularly suited for sequential data.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">These models can capture complex patterns and dependencies in time series data, often outperforming traditional methods on large datasets.<\/span><\/p>\n<h3 id=\"how-can-i-visualise-time-series-data-in-python\"><span class=\"ez-toc-section\" id=\"How_can_I_Visualise_Time_Series_Data_in_Python\"><\/span><b>How can I Visualise Time Series Data in Python?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Visualising time series data is essential for understanding trends and patterns. You can use libraries like Matplotlib and Seaborn to create line plots, scatter plots, and heatmaps. For example, you can use plt.plot() from Matplotlib to plot the time series data against time.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Additionally, libraries like Plotly and Bokeh offer interactive visualisations that can enhance data exploration.<\/span><\/p>\n<h3 id=\"what-is-the-difference-between-arima-and-seasonal-arima-sarima\"><span class=\"ez-toc-section\" id=\"What_is_the_Difference_Between_ARIMA_and_Seasonal_ARIMA_SARIMA\"><\/span><b>What is the Difference Between ARIMA and Seasonal ARIMA (SARIMA)?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"font-weight: 400;\">ARIMA (AutoRegressive Integrated Moving Average) is a popular model for forecasting non-seasonal time series data. It combines autoregression, differencing, and moving averages.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">SARIMA extends ARIMA by including seasonal components, making it suitable for time series data with seasonal patterns. SARIMA incorporates seasonal differencing and seasonal autoregressive and moving average terms, allowing it to model seasonal effects effectively.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"Discover essential techniques and libraries for effective Time Series Analysis and forecasting in Python.\n","protected":false},"author":7,"featured_media":13207,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[134],"tags":[561,560,559,2220,2208,2392,558,562],"ppma_author":[2175,2633],"class_list":{"0":"post-2190","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-python-programming","8":"tag-comparison-of-time-series-analysis-in-r-and-python","9":"tag-how-to-do-time-series-analysis-in-python","10":"tag-introduction-to-time-series-analysis-in-python","11":"tag-python","12":"tag-python-programming","13":"tag-time-series-analysis","14":"tag-time-series-analysis-in-python","15":"tag-time-series-analysis-python-example"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Time Series Analysis with Python: A Comprehensive Guide<\/title>\n<meta name=\"description\" content=\"Explore Time Series Analysis in Python: libraries, forecasting, data visualization, stationarity checks, and model performance evaluation.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is Time Series Analysis in Python?\" \/>\n<meta property=\"og:description\" content=\"Explore Time Series Analysis in Python: libraries, forecasting, data visualization, stationarity checks, and model performance evaluation.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Pickl.AI\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-17T09:27:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-08-22T07:17:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image19.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Aishwarya Kurre, Jogith Chandran\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Aishwarya Kurre\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/\"},\"author\":{\"name\":\"Aishwarya Kurre\",\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/#\\\/schema\\\/person\\\/8b3a7c10f39f9f1c132427f904c99f71\"},\"headline\":\"What is Time Series Analysis in Python?\",\"datePublished\":\"2023-01-17T09:27:25+00:00\",\"dateModified\":\"2024-08-22T07:17:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/\"},\"wordCount\":2205,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image19.jpg\",\"keywords\":[\"comparison of time series analysis in r and python\",\"how to do time series analysis in python\",\"Introduction to Time Series Analysis in Python\",\"python\",\"python programming\",\"Time Series Analysis\",\"Time Series Analysis in Python\",\"time series analysis python example\"],\"articleSection\":[\"Python Programming\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/\",\"url\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/\",\"name\":\"Time Series Analysis with Python: A Comprehensive Guide\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image19.jpg\",\"datePublished\":\"2023-01-17T09:27:25+00:00\",\"dateModified\":\"2024-08-22T07:17:06+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/#\\\/schema\\\/person\\\/8b3a7c10f39f9f1c132427f904c99f71\"},\"description\":\"Explore Time Series Analysis in Python: libraries, forecasting, data visualization, stationarity checks, and model performance evaluation.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image19.jpg\",\"contentUrl\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/image19.jpg\",\"width\":1200,\"height\":628,\"caption\":\"Time Series Analysis in Python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/time-series-analysis-in-python\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python Programming\",\"item\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/category\\\/python-programming\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"What is Time Series Analysis in Python?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/\",\"name\":\"Pickl.AI\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/#\\\/schema\\\/person\\\/8b3a7c10f39f9f1c132427f904c99f71\",\"name\":\"Aishwarya Kurre\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/pickl.ai\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/avatar_user_7_1663221500-96x96.jpg08d74abde215d32e24e9a755edd513ce\",\"url\":\"https:\\\/\\\/pickl.ai\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/avatar_user_7_1663221500-96x96.jpg\",\"contentUrl\":\"https:\\\/\\\/pickl.ai\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/09\\\/avatar_user_7_1663221500-96x96.jpg\",\"caption\":\"Aishwarya Kurre\"},\"description\":\"I work as a Data Science Ops at Pickl.ai and am an avid learner. Having experience in the field of data science, I believe that I have enough knowledge of data science. I also wrote a research paper and took a great interest in writing blogs, which improved my skills in data science. My research in data science pushes me to write unique content in this field. I enjoy reading books related to data science.\",\"url\":\"https:\\\/\\\/www.pickl.ai\\\/blog\\\/author\\\/aishwaryakurre\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Time Series Analysis with Python: A Comprehensive Guide","description":"Explore Time Series Analysis in Python: libraries, forecasting, data visualization, stationarity checks, and model performance evaluation.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/","og_locale":"en_US","og_type":"article","og_title":"What is Time Series Analysis in Python?","og_description":"Explore Time Series Analysis in Python: libraries, forecasting, data visualization, stationarity checks, and model performance evaluation.","og_url":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/","og_site_name":"Pickl.AI","article_published_time":"2023-01-17T09:27:25+00:00","article_modified_time":"2024-08-22T07:17:06+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image19.jpg","type":"image\/jpeg"}],"author":"Aishwarya Kurre, Jogith Chandran","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Aishwarya Kurre","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#article","isPartOf":{"@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/"},"author":{"name":"Aishwarya Kurre","@id":"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/8b3a7c10f39f9f1c132427f904c99f71"},"headline":"What is Time Series Analysis in Python?","datePublished":"2023-01-17T09:27:25+00:00","dateModified":"2024-08-22T07:17:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/"},"wordCount":2205,"commentCount":0,"image":{"@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image19.jpg","keywords":["comparison of time series analysis in r and python","how to do time series analysis in python","Introduction to Time Series Analysis in Python","python","python programming","Time Series Analysis","Time Series Analysis in Python","time series analysis python example"],"articleSection":["Python Programming"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/","url":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/","name":"Time Series Analysis with Python: A Comprehensive Guide","isPartOf":{"@id":"https:\/\/www.pickl.ai\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#primaryimage"},"image":{"@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image19.jpg","datePublished":"2023-01-17T09:27:25+00:00","dateModified":"2024-08-22T07:17:06+00:00","author":{"@id":"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/8b3a7c10f39f9f1c132427f904c99f71"},"description":"Explore Time Series Analysis in Python: libraries, forecasting, data visualization, stationarity checks, and model performance evaluation.","breadcrumb":{"@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#primaryimage","url":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image19.jpg","contentUrl":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image19.jpg","width":1200,"height":628,"caption":"Time Series Analysis in Python"},{"@type":"BreadcrumbList","@id":"https:\/\/www.pickl.ai\/blog\/time-series-analysis-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.pickl.ai\/blog\/"},{"@type":"ListItem","position":2,"name":"Python Programming","item":"https:\/\/www.pickl.ai\/blog\/category\/python-programming\/"},{"@type":"ListItem","position":3,"name":"What is Time Series Analysis in Python?"}]},{"@type":"WebSite","@id":"https:\/\/www.pickl.ai\/blog\/#website","url":"https:\/\/www.pickl.ai\/blog\/","name":"Pickl.AI","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.pickl.ai\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.pickl.ai\/blog\/#\/schema\/person\/8b3a7c10f39f9f1c132427f904c99f71","name":"Aishwarya Kurre","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2022\/09\/avatar_user_7_1663221500-96x96.jpg08d74abde215d32e24e9a755edd513ce","url":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2022\/09\/avatar_user_7_1663221500-96x96.jpg","contentUrl":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2022\/09\/avatar_user_7_1663221500-96x96.jpg","caption":"Aishwarya Kurre"},"description":"I work as a Data Science Ops at Pickl.ai and am an avid learner. Having experience in the field of data science, I believe that I have enough knowledge of data science. I also wrote a research paper and took a great interest in writing blogs, which improved my skills in data science. My research in data science pushes me to write unique content in this field. I enjoy reading books related to data science.","url":"https:\/\/www.pickl.ai\/blog\/author\/aishwaryakurre\/"}]}},"jetpack_featured_media_url":"https:\/\/www.pickl.ai\/blog\/wp-content\/uploads\/2023\/01\/image19.jpg","authors":[{"term_id":2175,"user_id":7,"is_guest":0,"slug":"aishwaryakurre","display_name":"Aishwarya Kurre","avatar_url":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2022\/09\/avatar_user_7_1663221500-96x96.jpg","first_name":"Aishwarya","user_url":"","last_name":"Kurre","description":"I work as a Data Science Ops at Pickl.ai and am an avid learner. Having experience in the field of data science, I believe that I have enough knowledge of data science. I also wrote a research paper and took a great interest in writing blogs, which improved my skills in data science. My research in data science pushes me to write unique content in this field. I enjoy reading books related to data science."},{"term_id":2633,"user_id":46,"is_guest":0,"slug":"jogithschandran","display_name":"Jogith Chandran","avatar_url":"https:\/\/pickl.ai\/blog\/wp-content\/uploads\/2024\/07\/avatar_user_46_1722419766-96x96.jpg","first_name":"Jogith","user_url":"","last_name":"Chandran","description":"Jogith S Chandran has joined our organization as an Analyst in Gurgaon. He completed his Bachelors IIIT Delhi in CSE this summer. He is interested in NLP, Reinforcement Learning, and AI Safety. He has hobbies like Photography and playing the Saxophone."}],"_links":{"self":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts\/2190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/comments?post=2190"}],"version-history":[{"count":12,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts\/2190\/revisions"}],"predecessor-version":[{"id":14088,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/posts\/2190\/revisions\/14088"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/media\/13207"}],"wp:attachment":[{"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/media?parent=2190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/categories?post=2190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/tags?post=2190"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.pickl.ai\/blog\/wp-json\/wp\/v2\/ppma_author?post=2190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}