Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
46bf318
typing
arw2019 Dec 9, 2020
eba7251
typing
arw2019 Dec 11, 2020
1a45267
typing
arw2019 Dec 11, 2020
f5cb185
typing
arw2019 Dec 11, 2020
4c9b764
review comments
arw2019 Dec 11, 2020
a273e5c
review comment
arw2019 Dec 13, 2020
e0558c5
review comment
arw2019 Dec 13, 2020
e156caa
merge master
arw2019 Dec 14, 2020
13ff245
merge master
arw2019 Dec 14, 2020
617e228
revert hints to pivot_table
arw2019 Dec 14, 2020
9a4d187
take out merge
arw2019 Dec 14, 2020
77e1142
minimize diff
arw2019 Dec 14, 2020
2352e45
fix eval return type annotation
arw2019 Dec 14, 2020
a3b7b1b
merge master
arw2019 Dec 14, 2020
1c942fd
review comments
arw2019 Dec 15, 2020
0e747dd
Merge branch 'master' of https://github.com/pandas-dev/pandas into ty…
arw2019 Dec 15, 2020
11247d9
review comments
arw2019 Dec 21, 2020
d82d81e
merge master
arw2019 Dec 21, 2020
56ee7c4
Merge branch 'master' of https://github.com/pandas-dev/pandas into ty…
arw2019 Dec 27, 2020
168cad2
review comments
arw2019 Jan 5, 2021
e12ed2e
Merge branch 'master' of https://github.com/pandas-dev/pandas into ty…
arw2019 Jan 5, 2021
6c876ff
review comments
arw2019 Jan 5, 2021
0e780ce
review comments
arw2019 Jan 5, 2021
a93489a
review: remove NpDtype usage
arw2019 Jan 6, 2021
2cd6823
merge master
arw2019 Jan 6, 2021
3e39e44
Merge branch 'master' of https://github.com/pandas-dev/pandas into ty…
arw2019 Jan 10, 2021
a28deaf
merge master
arw2019 Feb 11, 2021
9243c6b
merge master
arw2019 Feb 21, 2021
58fcad8
typing
arw2019 Feb 21, 2021
ff317d3
restore return type for memory_usage
arw2019 Feb 22, 2021
02647b5
remove return type for _series
arw2019 Feb 22, 2021
cc517a5
rogue comma
arw2019 Feb 22, 2021
666533c
Merge branch 'master' of https://github.com/pandas-dev/pandas into ty…
arw2019 Feb 22, 2021
5d08d71
Merge remote-tracking branch 'upstream/master' into typing-frame
simonjayhawkins Mar 14, 2021
3b52fc9
Merge remote-tracking branch 'upstream/master' into typing-frame
simonjayhawkins Mar 15, 2021
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge master
  • Loading branch information
arw2019 committed Feb 11, 2021
commit a28deafbb7c218f3d28c1c91c7e95a09e61c3b88
6 changes: 2 additions & 4 deletions pandas/_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@
FrameOrSeries = TypeVar("FrameOrSeries", bound="NDFrame")

Axis = Union[str, int]
Frequency = Optional[str]
Label = Optional[Hashable]
IndexLabel = Union[Label, Sequence[Label]]
Level = Union[Label, int]
IndexLabel = Union[Hashable, Sequence[Hashable]]
Level = Union[Hashable, int]
Shape = Tuple[int, ...]
Suffixes = Tuple[str, str]
Ordered = Optional[bool]
Expand Down
25 changes: 11 additions & 14 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
FloatFormatType,
FormattersType,
FrameOrSeriesUnion,
Frequency,
IndexKeyFunc,
IndexLabel,
Level,
Expand Down Expand Up @@ -1328,7 +1327,7 @@ def from_dict(
data,
orient: str = "columns",
dtype: Optional[Dtype] = None,
columns: Optional[List[Label]] = None,
columns: Optional[IndexLabel] = None,
) -> DataFrame:
"""
Construct DataFrame from dict of array-like or dicts.
Expand Down Expand Up @@ -1409,9 +1408,9 @@ def from_dict(

def to_numpy(
self,
dtype=None,
dtype: Optional[NpDtype] = None,
copy: bool = False,
na_value: Scalar = lib.no_default,
na_value=lib.no_default,
) -> np.ndarray:
"""
Convert the DataFrame to a NumPy array.
Expand Down Expand Up @@ -3338,7 +3337,7 @@ def _set_item(self, key, value) -> None:
self._set_item_mgr(key, value)

def _set_value(
self, index: Label, col, value: Scalar, takeable: bool = False
self, index: IndexLabel, col, value: Scalar, takeable: bool = False
) -> None:
"""
Put single value at passed column and index.
Expand Down Expand Up @@ -4019,7 +4018,7 @@ def _sanitize_column(self, value):
return value

@property
def _series(self) -> Dict[Label, Series]:
def _series(self) -> Dict[IndexLabel, Series]:
return {
item: Series(
self._mgr.iget(idx), index=self.index, name=item, fastpath=True
Expand All @@ -4028,7 +4027,7 @@ def _series(self) -> Dict[Label, Series]:
}

def lookup(
self, row_labels: Sequence[Label], col_labels: Sequence[Label]
self, row_labels: Sequence[IndexLabel], col_labels: IndexLabel
) -> np.ndarray:
"""
Label-based "fancy indexing" function for DataFrame.
Expand Down Expand Up @@ -4653,7 +4652,7 @@ def _replace_columnwise(
def shift(
self,
periods=1,
freq: Frequency = None,
freq=None,
axis: Axis = 0,
fill_value=lib.no_default,
) -> DataFrame:
Expand Down Expand Up @@ -8377,7 +8376,7 @@ def merge(
)

def round(
self, decimals: Union[int, Dict[Label, int], Series] = 0, *args, **kwargs
self, decimals: Union[int, Dict[IndexLabel, int], Series] = 0, *args, **kwargs
) -> DataFrame:
"""
Round a DataFrame to a variable number of decimal places.
Expand Down Expand Up @@ -9473,7 +9472,7 @@ def quantile(
@doc(NDFrame.asfreq, **_shared_doc_kwargs)
def asfreq(
self,
freq: Frequency,
freq,
method=None,
how: Optional[str] = None,
normalize: bool = False,
Expand Down Expand Up @@ -9520,7 +9519,7 @@ def resample(

def to_timestamp(
self,
freq: Frequency = None,
freq=None,
how: str = "start",
axis: Axis = 0,
copy: bool = True,
Expand Down Expand Up @@ -9556,9 +9555,7 @@ def to_timestamp(
setattr(new_obj, axis_name, new_ax)
return new_obj

def to_period(
self, freq: Frequency = None, axis: Axis = 0, copy: bool = True
) -> DataFrame:
def to_period(self, freq=None, axis: Axis = 0, copy: bool = True) -> DataFrame:
"""
Convert DataFrame from DatetimeIndex to PeriodIndex.

Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.