@property
def size(self) -> int:
    "\n        Return an int representing the number of elements in this object.\n\n        Return the number of rows if Series. Otherwise return the number of\n        rows times number of columns if DataFrame.\n\n        Examples\n        --------\n        >>> s = ps.Series({'a': 1, 'b': 2, 'c': None})\n        >>> s.size\n        3\n\n        >>> df = ps.DataFrame({'col1': [1, 2, None], 'col2': [3, 4, None]})\n        >>> df.size\n        6\n\n        >>> df = ps.DataFrame(index=[1, 2, None])\n        >>> df.size\n        0\n        "
    num_columns = len(self._internal.data_spark_columns)
    if (num_columns == 0):
        return 0
    else:
        return (len(self) * num_columns)
Return an int representing the number of elements in this object.

Return the number of rows if Series. Otherwise return the number of
rows times number of columns if DataFrame.

Examples
--------
>>> s = ps.Series({'a': 1, 'b': 2, 'c': None})
>>> s.size
3

>>> df = ps.DataFrame({'col1': [1, 2, None], 'col2': [3, 4, None]})
>>> df.size
6

>>> df = ps.DataFrame(index=[1, 2, None])
>>> df.size
0
@property
def size(self) -> int:
    "\n        Return an int representing the number of elements in this object.\n\n        Return the number of rows if Series. Otherwise return the number of\n        rows times number of columns if DataFrame.\n\n        Examples\n        --------\n        >>> s = ps.Series({'a': 1, 'b': 2, 'c': None})\n        >>> s.size\n        3\n\n        >>> df = ps.DataFrame({'col1': [1, 2, None], 'col2': [3, 4, None]})\n        >>> df.size\n        6\n\n        >>> df = ps.DataFrame(index=[1, 2, None])\n        >>> df.size\n        0\n        "
    num_columns = len(self._internal.data_spark_columns)
    if (num_columns == 0):
        return 0
    else:
        return (len(self) * num_columns)