8000 Fixed docstrings as referenced in issue no: #24071 by killerontherun1 · Pull Request #26520 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

Fixed docstrings as referenced in issue no: #24071 #26520

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 65 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
62deebc
Fixed docstrings as referenced in issue no: #24071
May 25, 2019
129b40c
CLN: remove __bytes__ (#26447)
topper-123 May 19, 2019
60d2438
BUG: Fix #25959 - Don't call .array in DatetimeLikeArrayMixin's map (…
ThomasKluiters May 19, 2019
843d372
DEPR: Change .ix DeprecationWarning -> FutureWarning (#26438)
jorisvandenbossche May 19, 2019
81ad35d
BUG: bugfix 26390 assigning PandasArray to DataFrame error (#26417)
shantanu-gontia May 19, 2019
a141cc5
BUG: fix calling local references with keyword arguments in query (#2…
danielhrisca May 19, 2019
5a8aad7
TST/DEPR: remove .ix from tests\indexing\multiindex\test_loc.py (#26451)
simonjayhawkins May 19, 2019
e3af0ce
BUG: ngroups and len(groups) do not equal when grouping with a list o…
shantanu-gontia May 20, 2019
323eb5e
BUG-20629 allow .at accessor with CategoricalIndex (#26298)
JustinZhengBC May 20, 2019
a5ce533
BUG: Exception when frame constructed from dict of iterators (#26356)
topper-123 May 20, 2019
f294d30
Add defensive check for argument errors keyword in to_numeric (#26466)
sumanau7 May 20, 2019
e98df14
DOC: fix example with Timestamp/integer addition (#26467)
jorisvandenbossche May 20, 2019
9fb07d6
DOC: whatsnew fixes
gfyoung May 20, 2019
1f6a751
DOC: #25723 passing kwargs to excel document engine (#26465)
Dunni3 May 20, 2019
198f7b8
DEPR: deprecate SparseArray.values (#26421)
jorisvandenbossche May 21, 2019
9712c2e
ENH - Index set operation modifications to address issue #23525 (#23538)
ms7463 May 21, 2019
6879e25
DOC/CLN: wil -> will (#26484)
simonjayhawkins May 21, 2019
be6d194
Fixed typo mutiplication -> multiplication. (#26489)
javabrett May 22, 2019
fbdea8c
DOC: fix SyntaxError in doc build on Windows (#26499)
simonjayhawkins May 23, 2019
8eb0c08
DOC: Highlighted role of index alignment in DataFrame.dot(other) (#26…
matsmaiwald May 23, 2019
b8d46a4
DOC/CLN: Change API reference section title (#26486)
simonjayhawkins May 24, 2019
736d2c5
CLN: Remove StringMixin from PandasObject (#26505)
topper-123 May 24, 2019
81acbef
Fix type annotations in pandas.core.indexes.datetimes (#26404)
vaibhavhrt May 24, 2019
4fa2a28
Better error message for DataFrame.hist() without numerical columns (…
matsmaiwald May 24, 2019
385fced
Excel Test Cleanup - ReadWriteClass (#26473)
WillAyd May 24, 2019
5cc13b5
CLN: pd.TimeGrouper (#26477)
mroeschke May 24, 2019
b72832d
CLN: Remove ExcelWriter.sheetname (#26464)
mroeschke May 25, 2019
3e32dcd
Merge branch 'master' into docstring_fix
May 25, 2019
67ebeb9
Fixed GL01 and GL02 in pandas.api
May 26, 2019
3b57213
GL01 and GL02 solved for pandas.eval
May 26, 2019
c9d2fb5
solved GL01 GL02 for pandas.HDFStore
May 26, 2019
0341bf4
solved GL01 GL02 for pandas.Index.T
May 26, 2019
dbbf44d
Fixed GL01 and GL02 in pandas.api
May 26, 2019
19fd64b
GL01 and GL02 solved for pandas.eval
May 26, 2019
f00abcf
solved GL01 GL02 for pandas.HDFStore
May 26, 2019
9dbf25f
CLN: remove __bytes__ (#26447)
topper-123 May 19, 2019
526c4df
BUG: Fix #25959 - Don't call .array in DatetimeLikeArrayMixin's map (…
ThomasKluiters May 19, 2019
612dc08
DEPR: Change .ix DeprecationWarning -> FutureWarning (#26438)
jorisvandenbossche May 19, 2019
62aee5a
BUG: bugfix 26390 assigning PandasArray to DataFrame error (#26417)
shantanu-gontia May 19, 2019
7b33e85
BUG: fix calling local references with keyword arguments in query (#2…
danielhrisca May 19, 2019
d69b8ce
TST/DEPR: remove .ix from tests\indexing\multiindex\test_loc.py (#26451)
simonjayhawkins May 19, 2019
c648673
BUG: ngroups and len(groups) do not equal when grouping with a list o…
shantanu-gontia May 20, 2019
5861fc9
BUG-20629 allow .at accessor with CategoricalIndex (#26298)
JustinZhengBC May 20, 2019
b68ca02
BUG: Exception when frame constructed from dict of iterators (#26356)
topper-123 May 20, 2019
c2d13dc
Add defensive check for argument errors keyword in to_numeric (#26466)
sumanau7 May 20, 2019
e588b69
DOC: fix example with Timestamp/integer addition (#26467)
jorisvandenbossche May 20, 2019
39b4db2
DOC: whatsnew fixes
gfyoung May 20, 2019
e1af4aa
DOC: #25723 passing kwargs to excel document engine (#26465)
Dunni3 May 20, 2019
0eb589b
DEPR: deprecate SparseArray.values (#26421)
jorisvandenbossche May 21, 2019
407eee1
ENH - Index set operation modifications to address issue #23525 (#23538)
ms7463 May 21, 2019
dbe8837
DOC/CLN: wil -> will (#26484)
simonjayhawkins May 21, 2019
35d517d
Fixed typo mutiplication -> multiplication. (#26489)
javabrett May 22, 2019
0b28ddf
DOC: fix SyntaxError in doc build on Windows (#26499)
simonjayhawkins May 23, 2019
b3c191a
DOC: Highlighted role of index alignment in DataFrame.dot(other) (#26…
matsmaiwald May 23, 2019
c75f08f
DOC/CLN: Change API reference section title (#26486)
simonjayhawkins May 24, 2019
030240f
CLN: Remove StringMixin from PandasObject (#26505)
topper-123 May 24, 2019
6105c62
Fix type annotations in pandas.core.indexes.datetimes (#26404)
vaibhavhrt May 24, 2019
1eca8b7
Better error message for DataFrame.hist() without numerical columns (…
matsmaiwald May 24, 2019
5e2b989
Excel Test Cleanup - ReadWriteClass (#26473)
WillAyd May 24, 2019
ea8822c
CLN: pd.TimeGrouper (#26477)
mroeschke May 24, 2019
c1cbc6d
CLN: Remove ExcelWriter.sheetname (#26464)
mroeschke May 25, 2019
d122189
GL01 and GL02 solved for pandas.eval
May 26, 2019
32211fc
solved GL01 GL02 for pandas.Index.T
May 26, 2019
15f1fa3
Merge branch 'docstring_fix' of https://github.com/killerontherun1/pa…
May 26, 2019
3d10423
Revert "Fixed docstrings as referenced in issue no: #24071"
May 26, 2019
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
Prev Previous commit
Next Next commit
Fix type annotations in pandas.core.indexes.datetimes (#26404)
  • Loading branch information
vaibhavhrt authored and killerontherun1 committed May 25, 2019
commit 81acbefea83e04b968ab11922367b983b7948831
6 changes: 0 additions & 6 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ ignore_errors=True
[mypy-pandas.core.indexes.datetimelike]
ignore_errors=True

[mypy-pandas.core.indexes.datetimes]
ignore_errors=True

[mypy-pandas.core.indexes.period]
ignore_errors=True

[mypy-pandas.core.indexes.timedeltas]
ignore_errors=True
14 changes: 7 additions & 7 deletions pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DatetimeIndexOpsMixin(ExtensionOpsMixin):
"""
common ops mixin to support a unified interface datetimelike Index
"""
_data = None # type: DatetimeLikeArrayMixin
_data = None

# DatetimeLikeArrayMixin assumes subclasses are mutable, so these are
# properties there. They can be made into cache_readonly for Index
Expand Down Expand Up @@ -220,9 +220,9 @@ def __contains__(self, key):

# Try to run function on index first, and then on elements of index
# Especially important for group-by functionality
def map(self, f):
def map(self, mapper, na_action=None):
try:
result = f(self)
result = mapper(self)

# Try to use this result if we can
if isinstance(result, np.ndarray):
Expand All @@ -232,7 +232,7 @@ def map(self, f):
raise TypeError('The map function must return an Index object')
return result
except Exception:
return self.astype(object).map(f)
return self.astype(object).map(mapper)

def sort_values(self, return_indexer=False, ascending=True):
"""
Expand Down Expand Up @@ -430,8 +430,8 @@ def argmax(self, axis=None, skipna=True, *args, **kwargs):
# --------------------------------------------------------------------
# Rendering Methods

def _format_with_header(self, header, **kwargs):
return header + list(self._format_native_types(**kwargs))
def _format_with_header(self, header, na_rep='NaT', **kwargs):
return header + list(self._format_native_types(na_rep, **kwargs))

@property
def _formatter_func(self):
Expand Down Expand Up @@ -509,7 +509,7 @@ def __rsub__(self, other):

cls.__rsub__ = __rsub__

def isin(self, values):
def isin(self, values, level=None):
"""
Compute boolean array of whether each index value is found in the
passed set of values.
Expand Down
12 changes: 7 additions & 5 deletions pandas/core/indexes/datetimes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import numpy as np

from pandas._libs import (
Timestamp, index as libindex, join as libjoin, lib, tslib as libts)
from pandas._libs import Timestamp, index as libindex, lib, tslib as libts
import pandas._libs.join as libjoin
from pandas._libs.tslibs import ccalendar, fields, parsing, timezones
from pandas.util._decorators import Appender, Substitution, cache_readonly

Expand Down Expand Up @@ -1087,9 +1087,11 @@ def slice_indexer(self, start=None, end=None, step=None, kind=None):
_is_monotonic_decreasing = Index.is_monotonic_decreasing
_is_unique = Index.is_unique

_timezone = cache_readonly(DatetimeArray._timezone.fget)
is_normalized = cache_readonly(DatetimeArray.is_normalized.fget)
_resolution = cache_readonly(DatetimeArray._resolution.fget)
_timezone = cache_readonly(DatetimeArray._timezone.fget) # type: ignore
is_normalized = cache_readonly(
DatetimeArray.is_normalized.fget) # type: ignore
_resolution = cache_readonly(
DatetimeArray._resolution.fget) # type: ignore

strftime = ea_passthrough(DatetimeArray.strftime)
_has_same_tz = ea_passthrough(DatetimeArray._has_same_tz)
Expand Down
0