File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ def cor_map (dataframe , num_col ):
3+ """
4+ A function to implement a correlation heatmap including coefficients based on given numeric columns of a data frame.
5+
6+ Args:
7+ dataframe (pandas.DataFrame): The data frame to be used for EDA.
8+ num_col (list): A list of string of column names with numeric data from the data frame.
9+
10+ Returns:
11+ (altair): A correlation heatmap plot with correlation coefficient labels based on the numeric columns specified by user.
12+
13+ Examples:
14+ import pandas as pd
15+ from eda_utils_py import cor_map
16+
17+ data = pd.DataFrame({
18+ 'SepalLengthCm':[5.1, 4.9, 4.7],
19+ 'SepalWidthCm':[1.4, 1.4, 1.3],
20+ 'PetalWidthCm:[0.2, 0.2, 0.2],
21+ 'Species':['Iris-setosa','Iris-virginica']
22+ })
23+
24+ numerical_columns = ['SepalLengthCm','SepalWidthCm','PetalWidthCm']
25+
26+ cor_map(data, numerical_columns)
27+
28+ """
You can’t perform that action at this time.
0 commit comments