Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It looks like that jupyter read my file DataP4. However, once i start using codes, it says that name DataP4 is not defined. what is
It looks like that jupyter read my file DataP4. However, once i start using codes, it says that name DataP4 is not defined. what is the issue? tried to solve it but failed.
import seaborn as sns import statsmodels.formula.api as smf import statsmodels.api as sm import matplotlib.pyplot as plt import numpy as np from statsmodels.graphics.gofplots import qqplot_2samples, qqplot import scipy.stats In [32]: import pandas as pd In [34]: df = pd.read_csv('Datap4.csv') In [35]: \# Descriptive statistics for the Eight variables \# After cleaning the period 4 variables, 608 entries were used for the subsequent analysis. The games won over the years ranged In [48]: import io DataP4=pd.read_csv(io.BytesIo(uploaded ['DataP4.csv'])) NameError Traceback (most recent call last) Cell In[40], line 2 1 import io ----> 2 DataP4=pd.read_csv(io.BytesIo(uploaded['DataP4.csv'])) NameError: name "uploaded" is not defined In [39]: \#Skewness and Kurtosis for the numerical variables used in the analysis variables = DataP4[['Games_Won', 'Earned_Runs', 'Runs_Scored', 'Hits', 'Doubles', 'Strike_Outs', 'Stolen_Bases', 'Errors']] skewness = variables.skew() kurtosis = variables.kurtosis() stats_df = pd.DataFrame(\{'Skewness': skewness, 'Kurtosis': kurtosis }) print(stats_df) NameError Cell In[39], line 2 1 \#Skewness and Kurtosis for the numerical Variables used in the analysis >2 variables = Datap4[['Games_Won', 'Earned_Runs', 'Runs_Scored', 'Hits', 'Doubles', 'Strike_Outs', 'Stolen_Bases', 'Error s']] 3 skewness = variables.skew() 4 kurtosis = variables.kurtosis() NameError: name 'DataP4' is not defined Traceback (most recent call last)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