admin管理员组文章数量:1558069
pandas使用query函数查询指定日期索引之前对应的dataframe数据行(select rows where date index before a certain date)
目录
pandas使用query函数查询指定日期索引之前对应的dataframe数据行(select rows where date index before a certain date)
#仿真数据
#pandas使用query函数查询指定日期索引对应的dataframe数据行(select rows using a single date in dataframe)
#pandas使用query函数查询指定日期索引之前对应的dataframe数据行(select rows where date index before a certain date)
#仿真数据
import pandas as pd
import numpy as np
data = {'产品':['肉类','盐铁','纺织','木材']*2,
'年份':[1046,1046,1046,1046,1047,1047,1047,1047],
'诸侯':['秦','齐','楚','秦','秦',&#
版权声明:本文标题:pandas使用query函数查询指定日期索引之前对应的dataframe数据行(select rows where date index before a certain date) 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/xitong/1727340890a1109394.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论