pandas 1.4.2

ParametersReturns

Parameters

val : object

This includes:

  • numpy array scalar (e.g. np.int64)

  • Python builtin numerics

  • Python builtin byte arrays and strings

  • None

  • datetime.datetime

  • datetime.timedelta

  • Period

  • decimal.Decimal

  • Interval

  • DateOffset

  • Fraction

  • Number.

Returns

bool

Return True if given object is scalar.

Return True if given object is scalar.

Examples

This example is valid syntax, but we were not able to check execution
>>> import datetime
... dt = datetime.datetime(2018, 10, 3)
... pd.api.types.is_scalar(dt) True
This example is valid syntax, but we were not able to check execution
>>> pd.api.types.is_scalar([2, 3])
False
This example is valid syntax, but we were not able to check execution
>>> pd.api.types.is_scalar({0: 1, 2: 3})
False
This example is valid syntax, but we were not able to check execution
>>> pd.api.types.is_scalar((0, 2))
False

pandas supports PEP 3141 numbers:

This example is valid syntax, but we were not able to check execution
>>> from fractions import Fraction
... pd.api.types.is_scalar(Fraction(3, 5)) True
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: None#None
type: <class 'builtin_function_or_method'>
Commit: