Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas-stubs/core/frame.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1484,9 +1484,9 @@ class DataFrame(NDFrame, OpsMixin):
column: _str | list[_str] | None = ...,
by: _str | ListLike | None = ...,
grid: _bool = ...,
xlabelsize: int | None = ...,
xlabelsize: float | str | None = ...,
xrot: float | None = ...,
ylabelsize: int | None = ...,
ylabelsize: float | str | None = ...,
yrot: float | None = ...,
ax: PlotAxes | None = ...,
sharex: _bool = ...,
Expand Down
8 changes: 4 additions & 4 deletions pandas-stubs/core/groupby/generic.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ class SeriesGroupBy(GroupBy[Series[S1]], Generic[S1, ByT]):
by: IndexLabel | None = ...,
ax: PlotAxes | None = ...,
grid: bool = ...,
xlabelsize: int | None = ...,
xlabelsize: float | str | None = ...,
xrot: float | None = ...,
ylabelsize: int | None = ...,
ylabelsize: float | str | None = ...,
yrot: float | None = ...,
figsize: tuple[float, float] | None = ...,
bins: int | Sequence[int] = ...,
Expand Down Expand Up @@ -358,9 +358,9 @@ class DataFrameGroupBy(GroupBy[DataFrame], Generic[ByT]):
column: IndexLabel | None = ...,
by: IndexLabel | None = ...,
grid: bool = ...,
xlabelsize: int | None = ...,
xlabelsize: float | str | None = ...,
xrot: float | None = ...,
ylabelsize: int | None = ...,
ylabelsize: float | str | None = ...,
yrot: float | None = ...,
ax: PlotAxes | None = ...,
sharex: bool = ...,
Expand Down
4 changes: 2 additions & 2 deletions pandas-stubs/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1174,9 +1174,9 @@ class Series(IndexOpsMixin[S1], NDFrame):
by: object | None = ...,
ax: PlotAxes | None = ...,
grid: _bool = ...,
xlabelsize: int | None = ...,
xlabelsize: float | _str | None = ...,
xrot: float | None = ...,
ylabelsize: int | None = ...,
ylabelsize: float | _str | None = ...,
yrot: float | None = ...,
figsize: tuple[float, float] | None = ...,
bins: int | Sequence = ...,
Expand Down
28 changes: 26 additions & 2 deletions tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,32 @@ def test_grouped_dataframe_hist(close_figures):
column="PetalWidth",
by="PetalLength",
grid=False,
xlabelsize=2,
ylabelsize=1,
xlabelsize=2.0,
ylabelsize=1.0,
yrot=10.0,
sharex=True,
sharey=False,
figsize=(1.5, 1.5),
bins=4,
),
Series,
),
Series,
)


def test_grouped_dataframe_hist_str(close_figures):
df = IRIS_DF.iloc[:50]
grouped = df.groupby("Name")
check(assert_type(grouped.hist(), Series), Series)
check(
assert_type(
grouped.hist(
column="PetalWidth",
by="PetalLength",
grid=False,
xlabelsize="large",
ylabelsize="small",
yrot=10.0,
sharex=True,
sharey=False,
Expand Down
Loading