#NEWLINE# def to_series( self , keep_tz = False ) : #NEWLINE# #INDENT# '\n        Create a Series with both index and values equal to the index keys\n        useful with map for returning an indexer based on an index\n\n        Parameters\n        ----------\n        keep_tz : optional, defaults False.\n            return the data keeping the timezone.\n\n            If keep_tz is True:\n\n              If the timezone is not set, the resulting\n              Series will have a datetime64[ns] dtype.\n\n              Otherwise the Series will have an datetime64[ns, tz] dtype; the\n              tz will be preserved.\n\n            If keep_tz is False:\n\n              Series will have a datetime64[ns] dtype. TZ aware\n              objects will have the tz removed.\n\n        Returns\n        -------\n        Series\n        ' #NEWLINE# from pandas import Series #NEWLINE# return Series ( self . _to_embed ( keep_tz ) , index = keep_tz , name = self . name )