Question
##Step 1: Import your data set ##----------------------------------------------------------------------------- solarkwh = pd.read_csv('Solar_KWH.csv') ##Step 2: Calculate descriptive statistics ##----------------------------------------------------------------------------- print ('Descriptive Statistics - Step 2') print ('') print
##Step 1: Import your data set
##-----------------------------------------------------------------------------
solarkwh = pd.read_csv('Solar_KWH.csv')
##Step 2: Calculate descriptive statistics
##-----------------------------------------------------------------------------
print ('Descriptive Statistics - Step 2')
print ('')
print ('Mean')
print (solarkwh[['cityA']].mean())
print ('')
print ('Median')
print (solarkwh[['cityA']].median())
print ('')
print ('Mode')
print (solarkwh[['cityA']].mode())
print ('')
print ('Minimum')
print (solarkwh[['cityA']].min())
print ('')
print ('Maximum')
print (solarkwh[['cityA']].max())
print ('')
print ('Mean')
print (solarkwh[['cityA']].var())
print ('')
print ('Standard Deviation')
print (solarkwh[['cityA']].std())
print ('')
print ('Describe')
print (solarkwh[['cityA']].describe())
print ('')
print ('')
##Step 3: Calculate descriptive statistics
##-----------------------------------------------------------------------------
print ('Descriptive Statistics - Step 3')
print ('')
print ('Mean')
print (solarkwh[['cityB']].mean())
print ('')
print ('Median')
print (solarkwh[['cityB']].median())
print ('')
print ('Mode')
print (solarkwh[['cityB']].mode())
print ('')
print ('Minimum')
print (solarkwh[['cityB']].min())
print ('')
print ('Maximum')
print (solarkwh[['cityB']].max())
print ('')
print ('Mean')
print (solarkwh[['cityB']].var())
print ('')
print ('Standard Deviation')
print (solarkwh[['cityB']].std())
print ('')
print ('Describe')
print (solarkwh[['cityB']].describe())
print ('')
Why wont this code work?
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started