Plots pairwise relationships between numerical features. Args: df (pd.DataFrame): DataFrame containing numerical features. numerical_features (list): List of column names to visualize. hue (str, optional): Categorical column for coloring points. Returns:
(df, numerical_features, hue=None)
| 269 | plt.show() |
| 270 | |
| 271 | def plot_pairwise_relationships(df, numerical_features, hue=None): |
| 272 | """ |
| 273 | Plots pairwise relationships between numerical features. |
| 274 | |
| 275 | Args: |
| 276 | df (pd.DataFrame): DataFrame containing numerical features. |
| 277 | numerical_features (list): List of column names to visualize. |
| 278 | hue (str, optional): Categorical column for coloring points. |
| 279 | |
| 280 | Returns: |
| 281 | None |
| 282 | """ |
| 283 | sns.pairplot(df[numerical_features + ([hue] if hue else [])], hue=hue, diag_kind="kde", markers="o") |
| 284 | plt.suptitle("Pairwise Relationships Between Numerical Features", fontsize=14) |
| 285 | plt.show() |
| 286 | |
| 287 | |
| 288 | def plot_category_vs_numerical(df, categorical_feature, numerical_feature): |
nothing calls this directly
no outgoing calls
no test coverage detected