Skip to content

Commit

Permalink
DOC: Fixed PR06 docstring errors in pandas.interval_range & pandas.ut…
Browse files Browse the repository at this point in the history
…il.hash_array (pandas-dev#28760)
  • Loading branch information
samyak-jn authored and proost committed Dec 19, 2019
1 parent 1d662ac commit d0e58fd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pandas/core/indexes/interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ def interval_range(
Left bound for generating intervals
end : numeric or datetime-like, default None
Right bound for generating intervals
periods : integer, default None
periods : int, default None
Number of periods to generate
freq : numeric, string, or DateOffset, default None
The length of each interval. Must be consistent with the type of start
Expand Down
24 changes: 13 additions & 11 deletions pandas/core/util/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ def hash_pandas_object(
Parameters
----------
index : boolean, default True
index : bool, default True
include the index in the hash (if Series/DataFrame)
encoding : string, default 'utf8'
encoding : str, default 'utf8'
encoding for data & key when strings
hash_key : string key to encode, default to _default_hash_key
hash_key : str, default '_default_hash_key'
hash_key for string key to encode
categorize : bool, default True
Whether to first categorize object arrays before hashing. This is more
efficient when the array contains duplicate values.
Expand Down Expand Up @@ -150,8 +151,8 @@ def hash_tuples(vals, encoding="utf8", hash_key=None):
Parameters
----------
vals : MultiIndex, list-of-tuples, or single tuple
encoding : string, default 'utf8'
hash_key : string key to encode, default to _default_hash_key
encoding : str, default 'utf8'
hash_key : str, default '_default_hash_key'
Returns
-------
Expand Down Expand Up @@ -193,8 +194,8 @@ def hash_tuple(val, encoding: str = "utf8", hash_key=None):
Parameters
----------
val : single tuple
encoding : string, default 'utf8'
hash_key : string key to encode, default to _default_hash_key
encoding : str, default 'utf8'
hash_key : str, default '_default_hash_key'
Returns
-------
Expand All @@ -216,8 +217,8 @@ def _hash_categorical(c, encoding: str, hash_key: str):
Parameters
----------
c : Categorical
encoding : string, default 'utf8'
hash_key : string key to encode, default to _default_hash_key
encoding : str, default 'utf8'
hash_key : str, default '_default_hash_key'
Returns
-------
Expand Down Expand Up @@ -253,9 +254,10 @@ def hash_array(vals, encoding: str = "utf8", hash_key=None, categorize: bool = T
Parameters
----------
vals : ndarray, Categorical
encoding : string, default 'utf8'
encoding : str, default 'utf8'
encoding for data & key when strings
hash_key : string key to encode, default to _default_hash_key
hash_key : str, default '_default_hash_key'
hash_key for string key to encode
categorize : bool, default True
Whether to first categorize object arrays before hashing. This is more
efficient when the array contains duplicate values.
Expand Down

0 comments on commit d0e58fd

Please sign in to comment.