Skip to content

Commit

Permalink
Backport PR #35776: Changed 'int' type to 'integer' in to_numeric doc…
Browse files Browse the repository at this point in the history
…string (#35806)

Co-authored-by: edwardkong <33737404+edwardkong@users.noreply.github.com>
  • Loading branch information
meeseeksmachine and edwardkong committed Aug 19, 2020
1 parent 92a6c3a commit 827e606
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pandas/core/arrays/sparse/array.py
Expand Up @@ -234,7 +234,7 @@ class SparseArray(PandasObject, ExtensionArray, ExtensionOpsMixin):
3. ``data.dtype.fill_value`` if `fill_value` is None and `dtype`
is not a ``SparseDtype`` and `data` is a ``SparseArray``.
kind : {'int', 'block'}, default 'int'
kind : {'integer', 'block'}, default 'integer'
The type of storage for sparse locations.
* 'block': Stores a `block` and `block_length` for each
Expand Down
4 changes: 2 additions & 2 deletions pandas/core/tools/numeric.py
Expand Up @@ -40,13 +40,13 @@ def to_numeric(arg, errors="raise", downcast=None):
- If 'raise', then invalid parsing will raise an exception.
- If 'coerce', then invalid parsing will be set as NaN.
- If 'ignore', then invalid parsing will return the input.
downcast : {'int', 'signed', 'unsigned', 'float'}, default None
downcast : {'integer', 'signed', 'unsigned', 'float'}, default None
If not None, and if the data has been successfully cast to a
numerical dtype (or if the data was numeric to begin with),
downcast that resulting data to the smallest numerical dtype
possible according to the following rules:
- 'int' or 'signed': smallest signed int dtype (min.: np.int8)
- 'integer' or 'signed': smallest signed int dtype (min.: np.int8)
- 'unsigned': smallest unsigned int dtype (min.: np.uint8)
- 'float': smallest float dtype (min.: np.float32)
Expand Down

0 comments on commit 827e606

Please sign in to comment.