import os
import numpy as np
import pandas as pd
path="/media/liao/Elements/MNIST/3-apple_point_clouds"
files=os.listdir(path)
# if os.path.exists("./new_building/building_points.txt"):
# os.remove("./new_building/building_points.txt")
# truth_txt=np.loadtxt('4-apples_GT_diameter_and_centre.txt',skiprows=1, dtype=str)
truth_txt = pd.read_csv('4-apples_GT_diameter_and_centre.txt',sep =',', header = None,names = ['Apple_ID','Diameter','Apple centre X','Apple centre Y','Apple centre Z'])
# truth = pd.DataFrame('2020_01_312')
a=truth_txt['Apple_ID']
b=np.array(a)
c=np.argwhere(b=='2018_01_001')
print(c)
# for file in filApple_IDes:
# position=path+file
# print(position)
# with open(position ,'r') as f:
# for line in f.readlines():
# with open("./new_building/building_points.txt","a") as p:
# p.write(line)
pandas numpy
最新推荐文章于 2024-10-06 07:39:55 发布