macpie.MacSeriesAccessor#
- class macpie.MacSeriesAccessor(ser)#
Custom Series accessor to extend the
pandas.DataSeriesFrame
object. This creates an additional namepace on the Series object calledmac
.The majority of methods exposed via this accessor are derived from functions already available from the public API. This is essentially syntactic sugar for calling those functions (leaving out the first argument, as that is the Series object using the accessor).
Examples
>>> import pandas as pd >>> import macpie as mp
>>> ser = pd.Series([1, 2, 3, None, '']) >>> ser.mac.rtrim() 0 1 1 2 2 3 dtype: object >>> mp.pandas.rtrim(ser, trim_empty_string=False) 0 1 1 2 2 3 3 None 4 dtype: object
- __init__(ser)#
Methods
__init__
(ser)Attributes
accessor_api