Skip to content
Merged
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
10 changes: 8 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
IndexLabel,
Level,
Manager,
NpDtype,
PythonFuncType,
Renamer,
StorageOptions,
Expand Down Expand Up @@ -1325,7 +1326,9 @@ def __rmatmul__(self, other):
# IO methods (to / from other formats)

@classmethod
def from_dict(cls, data, orient="columns", dtype=None, columns=None) -> DataFrame:
def from_dict(
cls, data, orient="columns", dtype: Optional[Dtype] = None, columns=None
) -> DataFrame:
"""
Construct DataFrame from dict of array-like or dicts.

Expand Down Expand Up @@ -1404,7 +1407,10 @@ def from_dict(cls, data, orient="columns", dtype=None, columns=None) -> DataFram
return cls(data, index=index, columns=columns, dtype=dtype)

def to_numpy(
self, dtype=None, copy: bool = False, na_value=lib.no_default
self,
dtype: Optional[NpDtype] = None,
copy: bool = False,
na_value=lib.no_default,
) -> np.ndarray:
"""
Convert the DataFrame to a NumPy array.
Expand Down