Pandas PD Numpy NP Matplotlib - Pyplot PLT Seaborn Sns DF PD - Read - CSV (, Encoding ) DF - Head
Pandas PD Numpy NP Matplotlib - Pyplot PLT Seaborn Sns DF PD - Read - CSV (, Encoding ) DF - Head
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
Discount Profit
0 0.00 41.9136
1 0.00 219.5820
2 0.45 -383.0310
3 0.00 14.1694
4 0.20 85.3092
[5 rows x 21 columns]
Row ID 0
Order ID 0
Order Date 0
Ship Date 0
Ship Mode 0
Customer ID 0
Customer Name 0
Segment 0
Country 0
City 0
State 0
Postal Code 0
Region 0
Product ID 0
Category 0
Sub-Category 0
Product Name 0
Sales 0
Quantity 0
Discount 0
Profit 0
dtype: int64
df.dropna(inplace=True)
# Find duplicates
df.duplicated().sum()
# Drop duplicates
df.drop_duplicates(inplace=True)
df.dtypes
Row ID int64
Order ID object
Order Date object
Ship Date object
Ship Mode object
Customer ID object
Customer Name object
Segment object
Country object
City object
State object
Postal Code int64
Region object
Product ID object
Category object
Sub-Category object
Product Name object
Sales float64
Quantity int64
Discount float64
Profit float64
dtype: object
df.describe()
Profit
count 2121.000000
mean 8.699327
std 136.049246
min -1862.312400
25% -12.849000
50% 7.774800
75% 33.726600
max 1013.127000
# Dataset info
df.info()
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 2121 entries, 0 to 2120
Data columns (total 21 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Row ID 2121 non-null int64
1 Order ID 2121 non-null object
2 Order Date 2121 non-null object
3 Ship Date 2121 non-null object
4 Ship Mode 2121 non-null object
5 Customer ID 2121 non-null object
6 Customer Name 2121 non-null object
7 Segment 2121 non-null object
8 Country 2121 non-null object
9 City 2121 non-null object
10 State 2121 non-null object
11 Postal Code 2121 non-null int64
12 Region 2121 non-null object
13 Product ID 2121 non-null object
14 Category 2121 non-null object
15 Sub-Category 2121 non-null object
16 Product Name 2121 non-null object
17 Sales 2121 non-null float64
18 Quantity 2121 non-null int64
19 Discount 2121 non-null float64
20 Profit 2121 non-null float64
dtypes: float64(3), int64(3), object(15)
memory usage: 348.1+ KB
Profit
count 2121.000000
mean 8.699327
std 136.049246
min -1862.312400
25% -12.849000
50% 7.774800
75% 33.726600
max 1013.127000
# Plot heatmap
plt.figure(figsize=(10, 8))
sns.heatmap(corr, annot=True, cmap='coolwarm', fmt=".2f",
linewidths=0.5)
plt.title("Correlation Heatmap")
plt.show()
sns.pairplot(df.select_dtypes(include=['float64', 'int64']))
plt.show()
# For each categorical column, show value counts
for col in df.select_dtypes(include='object').columns:
print(f"\nColumn: {col}")
print(df[col].value_counts())
Column: Order ID
Order ID
US-2017-162558 4
CA-2016-157749 4
US-2015-138121 4
US-2015-129007 4
CA-2014-145387 4
..
CA-2015-122973 1
CA-2016-136322 1
CA-2017-107209 1
CA-2015-162201 1
CA-2017-121258 1
Name: count, Length: 1764, dtype: int64
Column: Customer ID
Customer ID
SV-20365 15
LC-16885 9
KL-16555 9
CJ-12010 9
JE-15745 9
..
BD-11635 1
CS-12130 1
BG-11035 1
SC-20845 1
IM-15055 1
Name: count, Length: 707, dtype: int64
Column: Segment
Segment
Consumer 1113
Corporate 646
Home Office 362
Name: count, dtype: int64
Column: Country
Country
United States 2121
Name: count, dtype: int64
Column: City
City
New York City 192
Los Angeles 154
Philadelphia 111
San Francisco 102
Seattle 97
...
Mason 1
Santa Barbara 1
Bryan 1
San Bernardino 1
Indianapolis 1
Name: count, Length: 371, dtype: int64
Column: State
State
California 444
New York 236
Texas 202
Pennsylvania 125
Illinois 123
Washington 114
Ohio 93
Florida 85
Virginia 52
Colorado 51
Michigan 50
Arizona 49
Tennessee 45
North Carolina 42
Massachusetts 33
Georgia 32
Wisconsin 32
Kentucky 30
Maryland 28
New Jersey 26
Indiana 23
Oregon 21
Delaware 18
Rhode Island 16
Oklahoma 15
Connecticut 13
Minnesota 13
Missouri 11
Louisiana 11
Alabama 11
Arkansas 9
Mississippi 9
Nevada 9
Utah 7
South Carolina 6
New Hampshire 6
Idaho 6
New Mexico 4
Iowa 4
Nebraska 4
District of Columbia 3
Kansas 2
South Dakota 2
Vermont 2
Maine 1
Wyoming 1
Montana 1
West Virginia 1
Name: count, dtype: int64
Column: Region
Region
West 707
East 601
Central 481
South 332
Name: count, dtype: int64
Column: Product ID
Product ID
FUR-FU-10004270 16
FUR-CH-10001146 15
FUR-CH-10002647 15
FUR-FU-10001473 14
FUR-CH-10003774 14
..
FUR-BO-10000112 1
FUR-FU-10002874 1
FUR-FU-10003095 1
FUR-BO-10001567 1
FUR-CH-10002317 1
Name: count, Length: 375, dtype: int64
Column: Category
Category
Furniture 2121
Name: count, dtype: int64
Column: Sub-Category
Sub-Category
Furnishings 957
Chairs 617
Tables 319
Bookcases 228
Name: count, dtype: int64
..
Bush Birmingham Collection Bookcase, Dark Cherry
1
Ultra Commercial Grade Dual Valve Door Closer
1
Linden 12" Wall Clock With Oak Frame
1
Bush Westfield Collection Bookcases, Dark Cherry Finish, Fully
Assembled 1
Global Enterprise Series Seating Low-Back Swivel/Tilt Chairs
1
Name: count, Length: 380, dtype: int64
print(df.columns)
Index(['Row ID', 'Order ID', 'Order Date', 'Ship Date', 'Ship Mode',
'Customer ID', 'Customer Name', 'Segment', 'Country', 'City',
'State',
'Postal Code', 'Region', 'Product ID', 'Category', 'Sub-
Category',
'Product Name', 'Sales', 'Quantity', 'Discount', 'Profit'],
dtype='object')
plt.figure(figsize=(12, 6))
plt.xlabel('Date')
plt.ylabel('Sales')
plt.title('Sales Over Time by Region')
plt.legend()
plt.tight_layout()
plt.show()
plt.figure(figsize=(14, 6))
pivot_df.plot()
plt.title("Sales Time Series by Region")
plt.xlabel("Date")
plt.ylabel("Sales")
plt.legend(title="Region")
plt.grid(True)
plt.tight_layout()
plt.show()
plt.figure(figsize=(12, 5))
plt.plot(central_ts, label='Original')
plt.plot(rolling_avg, label='30-day Rolling Mean', color='red')
plt.title('Sales Trend - Central Region')
plt.legend()
plt.show()
!pip install statsmodels
Collecting statsmodels
Downloading statsmodels-0.14.5-cp313-cp313-win_amd64.whl.metadata
(9.8 kB)
Requirement already satisfied: numpy<3,>=1.22.3 in c:\users\aditya\
appdata\local\programs\python\python313\lib\site-packages (from
statsmodels) (2.3.1)
Requirement already satisfied: scipy!=1.9.2,>=1.8 in c:\users\aditya\
appdata\local\programs\python\python313\lib\site-packages (from
statsmodels) (1.16.0)
Requirement already satisfied: pandas!=2.1.0,>=1.4 in c:\users\aditya\
appdata\local\programs\python\python313\lib\site-packages (from
statsmodels) (2.3.0)
Collecting patsy>=0.5.6 (from statsmodels)
Downloading patsy-1.0.1-py2.py3-none-any.whl.metadata (3.3 kB)
Requirement already satisfied: packaging>=21.3 in c:\users\aditya\
appdata\local\programs\python\python313\lib\site-packages (from
statsmodels) (25.0)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\
aditya\appdata\local\programs\python\python313\lib\site-packages (from
pandas!=2.1.0,>=1.4->statsmodels) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in c:\users\aditya\
appdata\local\programs\python\python313\lib\site-packages (from
pandas!=2.1.0,>=1.4->statsmodels) (2025.2)
Requirement already satisfied: tzdata>=2022.7 in c:\users\aditya\
appdata\local\programs\python\python313\lib\site-packages (from
pandas!=2.1.0,>=1.4->statsmodels) (2025.2)
Requirement already satisfied: six>=1.5 in c:\users\aditya\appdata\
local\programs\python\python313\lib\site-packages (from python-
dateutil>=2.8.2->pandas!=2.1.0,>=1.4->statsmodels) (1.17.0)
Downloading statsmodels-0.14.5-cp313-cp313-win_amd64.whl (9.6 MB)
---------------------------------------- 0.0/9.6 MB ? eta -:--:--
---------------------------------------- 0.0/9.6 MB ? eta -:--:--
---------------------------------------- 0.0/9.6 MB ? eta -:--:--
---------------------------------------- 0.0/9.6 MB ? eta -:--:--
---------------------------------------- 0.0/9.6 MB ? eta -:--:--
- -------------------------------------- 0.3/9.6 MB ? eta -:--:--
- -------------------------------------- 0.3/9.6 MB ? eta -:--:--
- -------------------------------------- 0.3/9.6 MB ? eta -:--:--
- -------------------------------------- 0.3/9.6 MB ? eta -:--:--
- -------------------------------------- 0.3/9.6 MB ? eta -:--:--
- -------------------------------------- 0.3/9.6 MB ? eta -:--:--
- -------------------------------------- 0.3/9.6 MB ? eta -:--:--
-- ------------------------------------- 0.5/9.6 MB 172.9 kB/s eta
0:00:53
-- ------------------------------------- 0.5/9.6 MB 172.9 kB/s eta
0:00:53
-- ------------------------------------- 0.5/9.6 MB 172.9 kB/s eta
0:00:53
-- ------------------------------------- 0.5/9.6 MB 172.9 kB/s eta
0:00:53
-- ------------------------------------- 0.5/9.6 MB 172.9 kB/s eta
0:00:53
-- ------------------------------------- 0.5/9.6 MB 172.9 kB/s eta
0:00:53
--- ------------------------------------ 0.8/9.6 MB 194.6 kB/s eta
0:00:46
--- ------------------------------------ 0.8/9.6 MB 194.6 kB/s eta
0:00:46
--- ------------------------------------ 0.8/9.6 MB 194.6 kB/s eta
0:00:46
--- ------------------------------------ 0.8/9.6 MB 194.6 kB/s eta
0:00:46
--- ------------------------------------ 0.8/9.6 MB 194.6 kB/s eta
0:00:46
---- ----------------------------------- 1.0/9.6 MB 206.3 kB/s eta
0:00:42
---- ----------------------------------- 1.0/9.6 MB 206.3 kB/s eta
0:00:42
---- ----------------------------------- 1.0/9.6 MB 206.3 kB/s eta
0:00:42
---- ----------------------------------- 1.0/9.6 MB 206.3 kB/s eta
0:00:42
---- ----------------------------------- 1.0/9.6 MB 206.3 kB/s eta
0:00:42
---- ----------------------------------- 1.0/9.6 MB 206.3 kB/s eta
0:00:42
---- ----------------------------------- 1.0/9.6 MB 206.3 kB/s eta
0:00:42
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
----- ---------------------------------- 1.3/9.6 MB 196.9 kB/s eta
0:00:43
------ --------------------------------- 1.6/9.6 MB 190.4 kB/s eta
0:00:43
------ --------------------------------- 1.6/9.6 MB 190.4 kB/s eta
0:00:43
------ --------------------------------- 1.6/9.6 MB 190.4 kB/s eta
0:00:43
------ --------------------------------- 1.6/9.6 MB 190.4 kB/s eta
0:00:43
------ --------------------------------- 1.6/9.6 MB 190.4 kB/s eta
0:00:43
------ --------------------------------- 1.6/9.6 MB 190.4 kB/s eta
0:00:43
------ --------------------------------- 1.6/9.6 MB 190.4 kB/s eta
0:00:43
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
------- -------------------------------- 1.8/9.6 MB 188.5 kB/s eta
0:00:42
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
-------- ------------------------------- 2.1/9.6 MB 172.8 kB/s eta
0:00:44
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
--------- ------------------------------ 2.4/9.6 MB 160.9 kB/s eta
0:00:46
---------- ----------------------------- 2.6/9.6 MB 158.5 kB/s eta
0:00:45
---------- ----------------------------- 2.6/9.6 MB 158.5 kB/s eta
0:00:45
---------- ----------------------------- 2.6/9.6 MB 158.5 kB/s eta
0:00:45
---------- ----------------------------- 2.6/9.6 MB 158.5 kB/s eta
0:00:45
---------- ----------------------------- 2.6/9.6 MB 158.5 kB/s eta
0:00:45
---------- ----------------------------- 2.6/9.6 MB 158.5 kB/s eta
0:00:45
------------ --------------------------- 2.9/9.6 MB 163.6 kB/s eta
0:00:42
------------ --------------------------- 2.9/9.6 MB 163.6 kB/s eta
0:00:42
------------ --------------------------- 2.9/9.6 MB 163.6 kB/s eta
0:00:42
------------ --------------------------- 2.9/9.6 MB 163.6 kB/s eta
0:00:42
------------ --------------------------- 2.9/9.6 MB 163.6 kB/s eta
0:00:42
------------ --------------------------- 2.9/9.6 MB 163.6 kB/s eta
0:00:42
------------ --------------------------- 2.9/9.6 MB 163.6 kB/s eta
0:00:42
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
------------- -------------------------- 3.1/9.6 MB 164.4 kB/s eta
0:00:40
-------------- ------------------------- 3.4/9.6 MB 147.3 kB/s eta
0:00:43
-------------- ------------------------- 3.4/9.6 MB 147.3 kB/s eta
0:00:43
-------------- ------------------------- 3.4/9.6 MB 147.3 kB/s eta
0:00:43
-------------- ------------------------- 3.4/9.6 MB 147.3 kB/s eta
0:00:43
-------------- ------------------------- 3.4/9.6 MB 147.3 kB/s eta
0:00:43
-------------- ------------------------- 3.4/9.6 MB 147.3 kB/s eta
0:00:43
-------------- ------------------------- 3.4/9.6 MB 147.3 kB/s eta
0:00:43
--------------- ------------------------ 3.7/9.6 MB 148.6 kB/s eta
0:00:40
--------------- ------------------------ 3.7/9.6 MB 148.6 kB/s eta
0:00:40
--------------- ------------------------ 3.7/9.6 MB 148.6 kB/s eta
0:00:40
--------------- ------------------------ 3.7/9.6 MB 148.6 kB/s eta
0:00:40
--------------- ------------------------ 3.7/9.6 MB 148.6 kB/s eta
0:00:40
--------------- ------------------------ 3.7/9.6 MB 148.6 kB/s eta
0:00:40
--------------- ------------------------ 3.7/9.6 MB 148.6 kB/s eta
0:00:40
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
---------------- ----------------------- 3.9/9.6 MB 150.5 kB/s eta
0:00:38
----------------- ---------------------- 4.2/9.6 MB 149.6 kB/s eta
0:00:37
----------------- ---------------------- 4.2/9.6 MB 149.6 kB/s eta
0:00:37
----------------- ---------------------- 4.2/9.6 MB 149.6 kB/s eta
0:00:37
----------------- ---------------------- 4.2/9.6 MB 149.6 kB/s eta
0:00:37
----------------- ---------------------- 4.2/9.6 MB 149.6 kB/s eta
0:00:37
----------------- ---------------------- 4.2/9.6 MB 149.6 kB/s eta
0:00:37
----------------- ---------------------- 4.2/9.6 MB 149.6 kB/s eta
0:00:37
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------ --------------------- 4.5/9.6 MB 151.1 kB/s eta
0:00:35
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
------------------- -------------------- 4.7/9.6 MB 149.6 kB/s eta
0:00:33
-------------------- ------------------- 5.0/9.6 MB 145.2 kB/s eta
0:00:32
-------------------- ------------------- 5.0/9.6 MB 145.2 kB/s eta
0:00:32
-------------------- ------------------- 5.0/9.6 MB 145.2 kB/s eta
0:00:32
-------------------- ------------------- 5.0/9.6 MB 145.2 kB/s eta
0:00:32
-------------------- ------------------- 5.0/9.6 MB 145.2 kB/s eta
0:00:32
-------------------- ------------------- 5.0/9.6 MB 145.2 kB/s eta
0:00:32
--------------------- ------------------ 5.2/9.6 MB 145.0 kB/s eta
0:00:31
--------------------- ------------------ 5.2/9.6 MB 145.0 kB/s eta
0:00:31
--------------------- ------------------ 5.2/9.6 MB 145.0 kB/s eta
0:00:31
--------------------- ------------------ 5.2/9.6 MB 145.0 kB/s eta
0:00:31
--------------------- ------------------ 5.2/9.6 MB 145.0 kB/s eta
0:00:31
---------------------- ----------------- 5.5/9.6 MB 148.6 kB/s eta
0:00:28
---------------------- ----------------- 5.5/9.6 MB 148.6 kB/s eta
0:00:28
---------------------- ----------------- 5.5/9.6 MB 148.6 kB/s eta
0:00:28
---------------------- ----------------- 5.5/9.6 MB 148.6 kB/s eta
0:00:28
---------------------- ----------------- 5.5/9.6 MB 148.6 kB/s eta
0:00:28
---------------------- ----------------- 5.5/9.6 MB 148.6 kB/s eta
0:00:28
---------------------- ----------------- 5.5/9.6 MB 148.6 kB/s eta
0:00:28
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------ --------------- 5.8/9.6 MB 148.8 kB/s eta
0:00:26
------------------------- -------------- 6.0/9.6 MB 142.8 kB/s eta
0:00:26
------------------------- -------------- 6.0/9.6 MB 142.8 kB/s eta
0:00:26
------------------------- -------------- 6.0/9.6 MB 142.8 kB/s eta
0:00:26
------------------------- -------------- 6.0/9.6 MB 142.8 kB/s eta
0:00:26
------------------------- -------------- 6.0/9.6 MB 142.8 kB/s eta
0:00:26
------------------------- -------------- 6.0/9.6 MB 142.8 kB/s eta
0:00:26
------------------------- -------------- 6.0/9.6 MB 142.8 kB/s eta
0:00:26
-------------------------- ------------- 6.3/9.6 MB 146.9 kB/s eta
0:00:23
-------------------------- ------------- 6.3/9.6 MB 146.9 kB/s eta
0:00:23
-------------------------- ------------- 6.3/9.6 MB 146.9 kB/s eta
0:00:23
-------------------------- ------------- 6.3/9.6 MB 146.9 kB/s eta
0:00:23
-------------------------- ------------- 6.3/9.6 MB 146.9 kB/s eta
0:00:23
-------------------------- ------------- 6.3/9.6 MB 146.9 kB/s eta
0:00:23
-------------------------- ------------- 6.3/9.6 MB 146.9 kB/s eta
0:00:23
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
--------------------------- ------------ 6.6/9.6 MB 151.9 kB/s eta
0:00:21
---------------------------- ----------- 6.8/9.6 MB 150.9 kB/s eta
0:00:19
---------------------------- ----------- 6.8/9.6 MB 150.9 kB/s eta
0:00:19
---------------------------- ----------- 6.8/9.6 MB 150.9 kB/s eta
0:00:19
---------------------------- ----------- 6.8/9.6 MB 150.9 kB/s eta
0:00:19
---------------------------- ----------- 6.8/9.6 MB 150.9 kB/s eta
0:00:19
---------------------------- ----------- 6.8/9.6 MB 150.9 kB/s eta
0:00:19
---------------------------- ----------- 6.8/9.6 MB 150.9 kB/s eta
0:00:19
----------------------------- ---------- 7.1/9.6 MB 152.5 kB/s eta
0:00:17
----------------------------- ---------- 7.1/9.6 MB 152.5 kB/s eta
0:00:17
----------------------------- ---------- 7.1/9.6 MB 152.5 kB/s eta
0:00:17
----------------------------- ---------- 7.1/9.6 MB 152.5 kB/s eta
0:00:17
----------------------------- ---------- 7.1/9.6 MB 152.5 kB/s eta
0:00:17
------------------------------ --------- 7.3/9.6 MB 152.8 kB/s eta
0:00:15
------------------------------ --------- 7.3/9.6 MB 152.8 kB/s eta
0:00:15
------------------------------ --------- 7.3/9.6 MB 152.8 kB/s eta
0:00:15
------------------------------ --------- 7.3/9.6 MB 152.8 kB/s eta
0:00:15
------------------------------ --------- 7.3/9.6 MB 152.8 kB/s eta
0:00:15
------------------------------ --------- 7.3/9.6 MB 152.8 kB/s eta
0:00:15
------------------------------- -------- 7.6/9.6 MB 154.7 kB/s eta
0:00:13
------------------------------- -------- 7.6/9.6 MB 154.7 kB/s eta
0:00:13
------------------------------- -------- 7.6/9.6 MB 154.7 kB/s eta
0:00:13
------------------------------- -------- 7.6/9.6 MB 154.7 kB/s eta
0:00:13
-------------------------------- ------- 7.9/9.6 MB 159.3 kB/s eta
0:00:11
-------------------------------- ------- 7.9/9.6 MB 159.3 kB/s eta
0:00:11
-------------------------------- ------- 7.9/9.6 MB 159.3 kB/s eta
0:00:11
--------------------------------- ------ 8.1/9.6 MB 177.0 kB/s eta
0:00:09
--------------------------------- ------ 8.1/9.6 MB 177.0 kB/s eta
0:00:09
--------------------------------- ------ 8.1/9.6 MB 177.0 kB/s eta
0:00:09
--------------------------------- ------ 8.1/9.6 MB 177.0 kB/s eta
0:00:09
---------------------------------- ----- 8.4/9.6 MB 181.4 kB/s eta
0:00:07
---------------------------------- ----- 8.4/9.6 MB 181.4 kB/s eta
0:00:07
---------------------------------- ----- 8.4/9.6 MB 181.4 kB/s eta
0:00:07
---------------------------------- ----- 8.4/9.6 MB 181.4 kB/s eta
0:00:07
---------------------------------- ----- 8.4/9.6 MB 181.4 kB/s eta
0:00:07
---------------------------------- ----- 8.4/9.6 MB 181.4 kB/s eta
0:00:07
------------------------------------ --- 8.7/9.6 MB 182.3 kB/s eta
0:00:06
------------------------------------ --- 8.7/9.6 MB 182.3 kB/s eta
0:00:06
------------------------------------ --- 8.7/9.6 MB 182.3 kB/s eta
0:00:06
------------------------------------ --- 8.7/9.6 MB 182.3 kB/s eta
0:00:06
------------------------------------ --- 8.7/9.6 MB 182.3 kB/s eta
0:00:06
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
------------------------------------- -- 8.9/9.6 MB 184.6 kB/s eta
0:00:04
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
-------------------------------------- - 9.2/9.6 MB 179.1 kB/s eta
0:00:03
--------------------------------------- 9.4/9.6 MB 178.0 kB/s eta
0:00:01
--------------------------------------- 9.4/9.6 MB 178.0 kB/s eta
0:00:01
--------------------------------------- 9.4/9.6 MB 178.0 kB/s eta
0:00:01
---------------------------------------- 9.6/9.6 MB 179.0 kB/s eta
0:00:00
Downloading patsy-1.0.1-py2.py3-none-any.whl (232 kB)
Installing collected packages: patsy, statsmodels
Successfully installed patsy-1.0.1 statsmodels-0.14.5
# Decompose
decomposition = seasonal_decompose(ts, model='additive', period=30)
# Plot components
decomposition.plot()
plt.tight_layout()
plt.show()
plt.figure(figsize=(12, 5))
plot_acf(ts, lags=40)
plt.title('Autocorrelation (ACF) - Central Region')
plt.show()
plt.figure(figsize=(12, 5))
plot_pacf(ts, lags=40, method='ywm') # or method='ld'
plt.title('Partial Autocorrelation (PACF) - Central Region')
plt.show()