Data Analysis with Python Projects - Medical Data Visualizer - 7E7cPLdXTXZpvCBgESxH3

Tell us what’s happening:

I’m working on the Medical Data Visualizer project and I’m getting the below error for all modules:

Traceback (most recent call last):
File “”, line 2, in
import medical_data_visualizer
File “/home/runner/boilerplate-medical-data-visualizer-1/”, line 1, in
import pandas as pd
ModuleNotFoundError: No module named ‘pandas’

Can anyone please help me and let me know what to do in this case?

Thanks in advance!

Your code so far

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np

Import data

df = pd.read_csv(‘medical_examination.csv’)

Add ‘overweight’ column

#df[‘overweight’] = None

Normalize data by making 0 always good and 1 always bad. If the value of ‘cholesterol’ or ‘gluc’ is 1, make the value 0. If the value is more than 1, make the value 1.

Draw Categorical Plot

#def draw_cat_plot():
# Create DataFrame for cat plot using pd.melt using just the values from ‘cholesterol’, ‘gluc’, ‘smoke’, ‘alco’, ‘active’, and ‘overweight’.
#df_cat = None

# Group and reformat the data to split it by 'cardio'. Show the counts of each feature. You will have to rename one of the columns for the catplot to work correctly.
#df_cat = None

# Draw the catplot with 'sns.catplot()'

# Do not modify the next two lines
#return fig

Draw Heat Map

#def draw_heat_map():
# Clean the data
#df_heat = None

# Calculate the correlation matrix
#corr = None

# Generate a mask for the upper triangle
#mask = None

# Set up the matplotlib figure
#fig, ax = None

# Draw the heatmap with 'sns.heatmap()'

# Do not modify the next two lines
#return fig

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Data Analysis with Python Projects - Medical Data Visualizer

Link to the challenge:

Hey, please refer to the answer for a similar topic - ModuleNotFoundError: No module named 'pandas' or 'numpy' - #3 by sanity

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.