# -*- coding: utf-8 -*-
__Author__ = 'zhangbaojun'
__Time__ = '2018/6/6 14:00'
__File__ = 'data_volumn.py'
import pandas as pd
# time='DTCOLLECTTIME'
# volumn = 'SUM(D.NVOLUME)'
data = 'D:/Hisense/TrafficFlowPrediction/data/100211gaizao.csv'
df1 = pd.read_csv(data, encoding='utf-8', header=None, ).fillna(0)
df1.columns = ['time', 'volumn']
a = []
b=[]
# print(df1['time'].values[0][0:9])
for i in range(0, len(df1)):
if df1['time'].values[i][0:9] == '2018/1/20' or df1['time'].values[i][0:9] == '2018/1/21'\
or df1['time'].values[i][0:9] == '2018/1/27'or df1['time'].values[i][0:9] == '2018/1/28'\
or df1['time'].values[i][0:8] == '2018/2/3'or df1['time'].values[i][0:8] == '2018/2/4'\
or df1['time'].values[i][0:9] == '2018/2/10'or df1['time'].values[i][0:9] == '2018/2/15'\
or df1['time'].values[i][0:9] == '2018/2/16'or df1['time'].values[i][0:9] == '2018/2/17'\
or df1['time'].values[i][0:9] == '2018/2/18'or df1['time'].values[i][0:9] == '2018/2/19'\
or df1['time'].values[i][0:9] == '2018/2/20'or df1['time'].values[i][0:9] == '2018/2/21'\
or df1['time'].values[i][0:9] == '2018/2/25'\
or df1['time'].values[i][0:8] == '2018/3/3'or df1['time'].values[i][0:8] == '2018/3/4'\
or df1['time'].values[i][0:9] == '2018/3/10'or df1['time'].values[i][0:9] == '2018/3/11'\
or df1['time'].values[i][0:9] == '2018/3/17'or df1['time'].values[i][0:9] == '2018/3/18'\
or df1['time'].values[i][0:9] == '2018/3/24'or df1['time'].values[i][0:9] == '2018/3/25'\
or df1['time'].values[i][0:9] == '2018/3/31'or df1['time'].values[i][0:8] == '2018/4/1'\
or df1['time'].values[i][0:8] == '2018/4/5'or df1['time'].values[i][0:8] == '2018/4/6'\
or df1['time'].values[i][0:8] == '2018/4/7'or df1['time'].values[i][0:9] == '2018/4/14'\
or df1['time'].values[i][0:9] == '2018/4/15'or df1['time'].values[i][0:9] == '2018/4/21'\
or df1['time'].values[i][0:9] == '2018/4/22'or df1['time'].values[i][0:9] == '2018/4/29'\
or df1['time'].values[i][0:9] == '2018/4/28'or df1['time'].values[i][0:9] == '2018/4/30'\
or df1['time'].values[i][0:8] == '2018/5/1'or df1['time'].values[i][0:8] == '2018/5/5'\
or df1['time'].values[i][0:9] == '2018/5/6':
a.append([df1['time'].values[i],df1['volumn'].values[i]])
zhoumo=pd.DataFrame(a)
zhoumo.to_csv('100211_jiejiari.csv',index=None)
for i in range(0, len(df1)):
if df1['time'].values[i][0:9] != '2018/1/20' and df1['time'].values[i][0:9] != '2018/1/21'\
and df1['time'].values[i][0:9] != '2018/1/27'or df1['time'].values[i][0:9] != '2018/1/28'\
and df1['time'].values[i][0:8] != '2018/2/3'or df1['time'].values[i][0:8] != '2018/2/4'\
and df1['time'].values[i][0:9] != '2018/2/10'or df1['time'].values[i][0:9] != '2018/2/15'\
and df1['time'].values[i][0:9] != '2018/2/16'or df1['time'].values[i][0:9] != '2018/2/17'\
and df1['time'].values[i][0:9] != '2018/2/18'or df1['time'].values[i][0:9] != '2018/2/19'\
and df1['time'].values[i][0:9] != '2018/2/20'or df1['time'].values[i][0:9] != '2018/2/21'\
and df1['time'].values[i][0:9] != '2018/2/25'\
and df1['time'].values[i][0:8] != '2018/3/3'and df1['time'].values[i][0:8] != '2018/3/4'\
and df1['time'].values[i][0:9] != '2018/3/10'and df1['time'].values[i][0:9] != '2018/3/11'\
and df1['time'].values[i][0:9] != '2018/3/17'and df1['time'].values[i][0:9] != '2018/3/18'\
and df1['time'].values[i][0:9] != '2018/3/24'and df1['time'].values[i][0:9] != '2018/3/25'\
and df1['time'].values[i][0:9] != '2018/3/31'and df1['time'].values[i][0:8] != '2018/4/1'\
and df1['time'].values[i][0:8] != '2018/4/5'and df1['time'].values[i][0:8] != '2018/4/6'\
and df1['time'].values[i][0:8] != '2018/4/7'and df1['time'].values[i][0:9] != '2018/4/14'\
and df1['time'].values[i][0:9] != '2018/4/15'and df1['time'].values[i][0:9] != '2018/4/21'\
and df1['time'].values[i][0:9] != '2018/4/22'and df1['time'].values[i][0:9] != '2018/4/29'\
and df1['time'].values[i][0:9] != '2018/4/28'and df1['time'].values[i][0:9] != '2018/4/30'\
and df1['time'].values[i][0:8] != '2018/5/1'and df1['time'].values[i][0:8] != '2018/5/5'\
and df1['time'].values[i][0:9] != '2018/5/6':
b.append([df1['time'].values[i],df1['volumn'].values[i]])
zhoumo=pd.DataFrame(b)
zhoumo.to_csv('100211_gongzuori.csv',index=None)
# print(a)
# print(df1['time'].values[0])
博士僧小星
- 粉丝: 2384
- 资源: 5995
最新资源
- 基于QT实现的简单的停车场管理系统详细文档+全部资料+高分项目.zip
- 基于QT实现的银行管理系统详细文档+全部资料+高分项目.zip
- 基于QT实现的一个简单的个人网盘系统,分为好友操作和文件操作两部分。详细文档+全部资料+高分项目.zip
- 基于Qt实现的组态软件运行时系统原型详细文档+全部资料+高分项目.zip
- 基于Qt与MySQL的管理系统详细文档+全部资料+高分项目.zip
- 基于QT与C++的地铁自动售票系统详细文档+全部资料+高分项目.zip
- 基于Qt与C++开发的车载音乐播放系统详细文档+全部资料+高分项目.zip
- thinkphp6内核学生成绩管理系统源码 内附安装说明 站长亲测
- 基于粒子群的PMU优化配置 软件:MATLAB 介绍:电力系统PMU优化配置,为了使电力系统达到完全可观,以PMU配置数量最少为目标函数,运用粒子群算法进行优化处理,在IEEE30 39 57 118
- record_20241224_09_16_49.mp3
- Python实例-Python分块拆分txt文件中的数据
- Python实例-Python汇总各单位Excel档领料记录并加总每日领用次数
- Python实例-Python制作图形用户界面(GUI)让操作可视化
- mmexport1729869897900.jpg
- IMG_20241222_075106.jpg
- ThinkPHP5 MVC框架图书管理系统源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈