Load the given datasets categorical = pd.readcsv('chronickidneydiseasecategorical.csv')…
Jump to turn (29)
- 1Load the given datasets categorical = pd.readcsv('chronickidneydiseasecategorica
- 2Load the datasets categorical = pd.readcsv('chronickidneydiseasecategorical.csv'
- 3Merge the two given numerical and categorical datasets based on their uniqueID.
- 4NameError Traceback (most recent call last) Cell In[8], line 2 1 # Merge the two
- 5the col name is uniqueid but i get Cell In[11], line 2 1 # Merge the two given n
- 6Are all the unique ids are present in both datasets? Why do you think so? If not
- 7We want to know if we combine the datastes like we did if we have all fo the unq
- 8Calculate the percentage of rows that contain atleast one missing value Print %
- 9Let's start by checking if the given datasets have any duplicate rows (same Uniq
- 10UserWarning: Boolean Series key will be reindexed to match DataFrame index. prin
- 11we dont want the actual rows we just want how many rows tehre are for dups
- 12Number of duplicate rows in numerical dataset: 59 Number of duplicate rows in ca
- 13Sort the dataset according to the values in 'Target' column. Make sure reset the
- 14Part 3.5: Encoding Categorical data In this step, we identify and process the ca
- 15categoricalcolumns = ['rbc', 'pc', 'pcc', 'ba', 'htn', 'dm', 'cad', 'appet', 'pe
- 16Instead of true and false we want 1 and 0
- 17Encoded Dataset: uniqueid age bp bgr bu sc sod pot hemo pcv ... \ 0 995177 69.0
- 18Is tehre a pandas thing that just gets tsriaght 0s and 1s
- 19Remove outliers numericalcolumns = ['age', 'bp', 'bgr', 'bu', 'sc', 'sod', 'pot'
- 20Part 3.6 : Remove Outliers from Numerical Columns Outliers can disproportionatel
- 21Part 3.6 : Remove Outliers from Numerical Columns Outliers can disproportionatel
- 22use encoded data set that we just ahd tho
- 23Normalizing numerical attributes ensures that all features contribute equally to
- 24Are there any columns in this dataset which are not appropriate for modeling and
- 25why would we remove target
- 26KeyError Traceback (most recent call last) Cell In[53], line 2 1 # Drop the iden
- 27how do i get it back if i dropped it
- 28Now that you've completed these cleaning steps you should have a pandas datafram
- 29Take the cleaned dataset that you created in part three and output the top 15 ro
- User
Load the given datasets
categorical = pd.read_csv('chronic_kidney_disease_categorical.csv') numerical = pd.read_csv('chronic_kidney_disease_numerical.csv')
Print the data
print(categorical) print(numerical)
Let's start by checking if the given datasets have any duplicate rows (same Unique Id). Use pandas to identify and remove these duplicate rows from the given dataset
- Assistant