Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is size-mutable as per Python's pandas DataFrame class?

What does size-mutable mean, in this context?

"Two-dimensional size-mutable, potentially heterogeneous tabular data structure with labeled axes (rows and columns). Arithmetic operations align on both row and column labels. Can be thought of as a dict-like container for Series objects. The primary pandas data structure"

from: https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.html

I presume it means the size is mutable--the size can be changed. Is this correct?

like image 414
ja_him Avatar asked Oct 16 '25 13:10

ja_him


1 Answers

You are right. Size mutable refers that elements can be appended or deleted/pop-ed from a DataFrame. On the contrary a Series is Size immutable, which means once a Series object is created operations such as appending/deleting which would change the size of the object are not allowed.

like image 182
Sandeep Avatar answered Oct 18 '25 10:10

Sandeep



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!