<jupyter_start><jupyter_text>Case Study - Sales Data<jupyter_code># All imports
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd<jupyter_output><empty_output><jupyter_text>Sales and Profit data is read in dataframe "sales"<jupyter_code># Read file 

sales = pd.read_excel('sales.xlsx')
sales
# Read file and set 1st two columns as index
sales = pd.read_excel('sales.xlsx', index_col = [0,1])

sales<jupyter_output><empty_output><jupyter_text>Example - 1   Display first 3 land last 3 rows of the sales dataframe<jupyter_code>sales.head() # Default - returns top 5 rows
sales.head(3)
sales.tail()
sales.tail(3)<jupyter_output><empty_output><jupyter_text>Example - 2   Display the information about the data stored in data frame<jupyter_code>sales.info()<jupyter_output><class 'pandas.core.frame.DataFrame'>
MultiIndex: 23 entries, ('Africa', 'Western Africa') to ('USCA', 'Canada')
Data columns (total 3 columns):
 #   Column        Non-Null Count  Dtype  
---  ------        --------------  -----  
 0   No_of_Orders  23 non-null     int64  
 1   Profit        23 non-null     float64
 2   Sales         23 non-null     float64
dtypes: float64(2), int64(1)
memory usage: 1.6+ KB<jupyter_text>Display the statistical information about the data in dataframe<jupyter_code>sales.describe()
sales[["Sales", "Profit"]].plot(kind= "box", subplots= True)
plt.show()
sales["Profit"]
df = pd.read_csv('rating.csv', index_col = [2,1])
df.head()
df = pd.read_csv('forestfires.csv')
print(df.describe())
print(df.columns)
print(df.shape)<jupyter_output>X           Y        FFMC         DMC          DC         ISI  \
count  517.000000  517.000000  517.000000  517.000000  517.000000  517.000000   
mean     4.669246    4.299807   90.644681  110.872340  547.940039    9.021663   
std      2.313778    1.229900    5.520111   64.046482  248.066192    4.559477   
min      1.000000    2.000000   18.700000    1.100000    7.900000    0.000000   
25%      3.000000    4.000000   90.200000   68.600000  437.700000    6.500000   
50%      4.000000    4.000000   91.600000  108.300000  664.200000    8.400000   
75%      7.000000    5.000000   92.900000  142.400000  713.900000   10.800000   
max      9.000000    9.000000   96.200000  291.300000  860.600000   56.100000   

             temp          RH        wind        rain         area  
count  517.000000  517.000000  517.000000  517.000000   517.000000  
mean    18.889168   44.288201    4.017602    0.021663    12.847292  
std      5.806625   16.317469    1.791653    0.295959    63.655[...]
StarcoderdataJupyterStructuredCleanDedup