Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 pandas as pd 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 df= pd.read_csv('DataP4.csv') import seaborn as sns from sklearn.preprocessing import LabelEncoder \#\# Variable Selection corr_mat=DataP4.corr(method='spearman ', numeric_only="True") upper_corr_mat = corr_mat.where ( np.triu(np.ones(corr_mat.shape), k=1). astype(np.bool)) \# Convert to 1-D series d drop Null values unique_corr_pairs = upper_corr_mat.unstack().dropna() NameError Traceback (most recent call last) Cell In[48], line 5 2 from sklearn.preprocessing import LabelEncoder 4 \#\#\# Variable Selection ---> 5 corr_mat=DataP4.corr(method='spearman', numeric_only="True") 6 upper_corr_mat = corr_mat. where ( 8 \# Convert to 1D series and drop Null values NameError: name 'DataP4' is not defined

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases And Python Programming MySQL MongoDB OOP And Tkinter

Authors: R. PANNEERSELVAM

1st Edition

9357011331, 978-9357011334

More Books

Students also viewed these Databases questions

Question

Of what value is the calculation of book value per share?

Answered: 1 week ago