本文整理汇总了Python中pandas.SparseSeries.name方法的典型用法代码示例。如果您正苦于以下问题:Python SparseSeries.name方法的具体用法?Python SparseSeries.name怎么用?Python SparseSeries.name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pandas.SparseSeries
的用法示例。
在下文中一共展示了SparseSeries.name方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _create_sp_series
# 需要导入模块: from pandas import SparseSeries [as 别名]
# 或者: from pandas.SparseSeries import name [as 别名]
def _create_sp_series():
nan = np.nan
# nan-based
arr = np.arange(15, dtype=np.float64)
arr[7:12] = nan
arr[-1:] = nan
bseries = SparseSeries(arr, kind='block')
bseries.name = u'bseries'
return bseries
示例2: _create_sp_tsseries
# 需要导入模块: from pandas import SparseSeries [as 别名]
# 或者: from pandas.SparseSeries import name [as 别名]
def _create_sp_tsseries():
nan = np.nan
# nan-based
arr = np.arange(15, dtype=np.float64)
arr[7:12] = nan
arr[-1:] = nan
date_index = bdate_range('1/1/2011', periods=len(arr))
bseries = SparseSeries(arr, index=date_index, kind='block')
bseries.name = u'btsseries'
return bseries
示例3: _create_sp_series
# 需要导入模块: from pandas import SparseSeries [as 别名]
# 或者: from pandas.SparseSeries import name [as 别名]
def _create_sp_series():
import numpy as np
from pandas import SparseSeries
nan = np.nan
# nan-based
arr = np.arange(15, dtype=np.float64)
arr[7:12] = nan
arr[-1:] = nan
bseries = SparseSeries(arr, kind='block')
bseries.name = 'bseries'
return bseries
示例4: _create_sp_series
# 需要导入模块: from pandas import SparseSeries [as 别名]
# 或者: from pandas.SparseSeries import name [as 别名]
def _create_sp_series():
import numpy as np
from pandas import bdate_range, SparseSeries
nan = np.nan
# nan-based
arr = np.arange(15, dtype=float)
index = np.arange(15)
arr[7:12] = nan
arr[-1:] = nan
date_index = bdate_range('1/1/2011', periods=len(index))
bseries = SparseSeries(arr, index=index, kind='block')
bseries.name = 'bseries'
return bseries