Saturday 19 August 2023

The Essential Pandas Series Attributes: A Cheat Sheet

 

Following table summarizes the core attributes of Pandas series

 

Attribute

Description

dtype

Returns the data type of the values in the Series.

empty

Returns a boolean True, when the series is empty, else False.

is_unique

Return True if the series contain unique elements, else False

index

Returns the index labels of the Series.

name

Returns the name of the Series.

ndim

Returns the number of dimensions of the Series, it is 1 in general.

shape

Return the shape of the Series (number of rows, number of columns).

size

Returns the number of elements in the Series.

values

Returns the array of values contained in the Series.

 

 

 

 

Previous                                                 Next                                                 Home

No comments:

Post a Comment