Skip to content

Commit 84984c6

Browse files
samyak-jnNico Cernek
authored and
Nico Cernek
committed
DOC: Fixed PR06 docstring errors in pandas.interval_range & pandas.util.hash_array (pandas-dev#28760)
1 parent 0e50a80 commit 84984c6

File tree

2 files changed

+14
-12
lines changed

2 files changed

+14
-12
lines changed

pandas/core/indexes/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ def interval_range(
14101410
Left bound for generating intervals
14111411
end : numeric or datetime-like, default None
14121412
Right bound for generating intervals
1413-
periods : integer, default None
1413+
periods : int, default None
14141414
Number of periods to generate
14151415
freq : numeric, string, or DateOffset, default None
14161416
The length of each interval. Must be consistent with the type of start

pandas/core/util/hashing.py

+13-11
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,12 @@ def hash_pandas_object(
6666
6767
Parameters
6868
----------
69-
index : boolean, default True
69+
index : bool, default True
7070
include the index in the hash (if Series/DataFrame)
71-
encoding : string, default 'utf8'
71+
encoding : str, default 'utf8'
7272
encoding for data & key when strings
73-
hash_key : string key to encode, default to _default_hash_key
73+
hash_key : str, default '_default_hash_key'
74+
hash_key for string key to encode
7475
categorize : bool, default True
7576
Whether to first categorize object arrays before hashing. This is more
7677
efficient when the array contains duplicate values.
@@ -150,8 +151,8 @@ def hash_tuples(vals, encoding="utf8", hash_key=None):
150151
Parameters
151152
----------
152153
vals : MultiIndex, list-of-tuples, or single tuple
153-
encoding : string, default 'utf8'
154-
hash_key : string key to encode, default to _default_hash_key
154+
encoding : str, default 'utf8'
155+
hash_key : str, default '_default_hash_key'
155156
156157
Returns
157158
-------
@@ -193,8 +194,8 @@ def hash_tuple(val, encoding: str = "utf8", hash_key=None):
193194
Parameters
194195
----------
195196
val : single tuple
196-
encoding : string, default 'utf8'
197-
hash_key : string key to encode, default to _default_hash_key
197+
encoding : str, default 'utf8'
198+
hash_key : str, default '_default_hash_key'
198199
199200
Returns
200201
-------
@@ -216,8 +217,8 @@ def _hash_categorical(c, encoding: str, hash_key: str):
216217
Parameters
217218
----------
218219
c : Categorical
219-
encoding : string, default 'utf8'
220-
hash_key : string key to encode, default to _default_hash_key
220+
encoding : str, default 'utf8'
221+
hash_key : str, default '_default_hash_key'
221222
222223
Returns
223224
-------
@@ -253,9 +254,10 @@ def hash_array(vals, encoding: str = "utf8", hash_key=None, categorize: bool = T
253254
Parameters
254255
----------
255256
vals : ndarray, Categorical
256-
encoding : string, default 'utf8'
257+
encoding : str, default 'utf8'
257258
encoding for data & key when strings
258-
hash_key : string key to encode, default to _default_hash_key
259+
hash_key : str, default '_default_hash_key'
260+
hash_key for string key to encode
259261
categorize : bool, default True
260262
Whether to first categorize object arrays before hashing. This is more
261263
efficient when the array contains duplicate values.

0 commit comments

Comments
 (0)