Skip to content

Commit

Permalink
Fix values type (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
joannasendorek authored Oct 5, 2021
1 parent 859854c commit 340e827
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions tests/snippets/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,3 +422,10 @@ def test_types_eq() -> None:

def test_types_rename_axis() -> None:
s: pd.Series = pd.Series([1, 2, 3]).rename_axis("A")


def test_types_values() -> None:
n1: np.ndarray = pd.Series([1, 2, 3]).values
n2: np.ndarray = pd.Series(list('aabc')).values
n3: np.ndarray = pd.Series(list('aabc')).astype('category').values
n4: np.ndarray = pd.Series(pd.date_range('20130101', periods=3, tz='US/Eastern')).values
2 changes: 1 addition & 1 deletion third_party/3/pandas/core/series.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class Series(base.IndexOpsMixin, generic.NDFrame):
@name.setter
def name(self, value: Optional[Hashable]) -> None: ...
@property
def values(self) -> Any: ...
def values(self) -> np.ndarray: ...
@property
def hasnans(self) -> bool: ...
@property
Expand Down

0 comments on commit 340e827

Please sign in to comment.