pandas-plots 0.10.0__tar.gz → 0.10.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pandas-plots-0.10.0/src/pandas_plots.egg-info → pandas-plots-0.10.1}/PKG-INFO +1 -1
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/setup.cfg +1 -1
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots/pls.py +13 -4
- {pandas-plots-0.10.0 → pandas-plots-0.10.1/src/pandas_plots.egg-info}/PKG-INFO +1 -1
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/LICENSE +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/README.md +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/pyproject.toml +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots/hlp.py +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots/tbl.py +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots/ven.py +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots.egg-info/SOURCES.txt +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots.egg-info/dependency_links.txt +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots.egg-info/requires.txt +0 -0
- {pandas-plots-0.10.0 → pandas-plots-0.10.1}/src/pandas_plots.egg-info/top_level.txt +0 -0
@@ -571,7 +571,7 @@ def plot_bars(
|
|
571
571
|
|
572
572
|
|
573
573
|
def plot_histogram(
|
574
|
-
|
574
|
+
df_ser: pd.DataFrame | pd.Series,
|
575
575
|
histnorm: Literal[
|
576
576
|
"probability", "probability density", "density", "percent", None
|
577
577
|
] = None,
|
@@ -587,10 +587,13 @@ def plot_histogram(
|
|
587
587
|
title: str = None,
|
588
588
|
) -> None:
|
589
589
|
"""
|
590
|
-
A function to plot a histogram based on
|
590
|
+
A function to plot a histogram based on *numeric* columns in a DataFrame.
|
591
|
+
Accepts:
|
592
|
+
- a numeric series
|
593
|
+
- a dataframe with only numeric columns
|
591
594
|
|
592
595
|
Parameters:
|
593
|
-
|
596
|
+
df_ser (pd.DataFrame | pd.Series): The input containing the data to be plotted.
|
594
597
|
histnorm (Literal["probability", "probability density", "density", "percent", None]): The normalization mode for the histogram. Default is None.
|
595
598
|
nbins (int): The number of bins in the histogram. Default is 0.
|
596
599
|
orientation (Literal["h", "v"]): The orientation of the histogram. Default is "v".
|
@@ -606,6 +609,12 @@ def plot_histogram(
|
|
606
609
|
Returns:
|
607
610
|
None
|
608
611
|
"""
|
612
|
+
|
613
|
+
# * convert to df if series
|
614
|
+
if isinstance(df_ser, pd.Series):
|
615
|
+
df = df_ser.to_frame()
|
616
|
+
else:
|
617
|
+
df=df_ser
|
609
618
|
|
610
619
|
col_not_num = df.select_dtypes(exclude="number").columns
|
611
620
|
if any(col_not_num):
|
@@ -660,7 +669,7 @@ def plot_joint(
|
|
660
669
|
title: str = "",
|
661
670
|
) -> None:
|
662
671
|
"""
|
663
|
-
Generate a seaborn joint plot for two
|
672
|
+
Generate a seaborn joint plot for *two numeric* columns of a given DataFrame.
|
664
673
|
|
665
674
|
Parameters:
|
666
675
|
- df: The DataFrame containing the data to be plotted.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|