当前位置: 首页>>代码示例>>Python>>正文


Python Parsing.parse方法代码示例

本文整理汇总了Python中Parsing.parse方法的典型用法代码示例。如果您正苦于以下问题:Python Parsing.parse方法的具体用法?Python Parsing.parse怎么用?Python Parsing.parse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Parsing的用法示例。


在下文中一共展示了Parsing.parse方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: print

# 需要导入模块: import Parsing [as 别名]
# 或者: from Parsing import parse [as 别名]
import FileNameReading, Parsing, Structure, Functions, Clean
import matplotlib.pyplot as plt
import datetime
import numpy as np


# dictionary that contains all the filenames
filenames = FileNameReading.get_file_names()

all_sensors = []

for i in filenames.keys():
    current_sensor = []

    data = Parsing.parse(i)
    print("Current file being read is " + i)
    data = Clean.remove_empty(data)
    for row in data:
        for k, v in row.items():
            if k == "Timestamp":
                line = row[k].split(' ')
                second_value = line[1].split('A') or line[1].split('P')
                row[k] = ((line[0]), (second_value[0]))
                # row[k] = (v, str(v))
        current_sensor.append(row)
        # datetime.datetime.strptime()
    all_sensors.append(current_sensor)

# print(all_sensors)

x = []
开发者ID:happystep,项目名称:traffic,代码行数:33,代码来源:main.py

示例2: print

# 需要导入模块: import Parsing [as 别名]
# 或者: from Parsing import parse [as 别名]
import numpy as np
import Parsing
import matplotlib.pyplot as plt
from scipy.spatial import Voronoi, voronoi_plot_2d, Delaunay
from scipy.spatial import  KDTree, tsearch


data = Parsing.parse("individual_sensors_data.csv")
# print(data)

long = []
lat = []

cur = []

for y in data:
    for k, v in y.items():
        if v == "I35 N":
            cur.append(y)

for x in cur:
    for k, v in x.items():
        if k == "Longitude":
            long.append(float(v))
        elif k == "Latitude":
            lat.append(float(v))
# print(lat)
# print(long)


开发者ID:happystep,项目名称:traffic,代码行数:30,代码来源:Triangulation.py


注:本文中的Parsing.parse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。