'how to convert uff files to csv?
I have a bunch of uff files and im trying to write a code that opens the file and converts it to csv.
this is my code so far
import pandas as pd
import pyuff as pu
uff_file = pu.UFF(r'C:\Users\name\Downloads\WEICAN#1.uff')
uff_file.get_set_types()
data = uff_file.read_sets()
data[4].keys()
#test = pd.read_csv(r'C:\Users\name\Downloads\WEICAN#1.uff')
#test.to_csv(r'C:\Users\name\Downloads\WEICAN#1.csv', index=None)
i get this as the error when i try to run it but im not really sure what it means.
Traceback (most recent call last):
File "C:\Users\name\PycharmProjects\pythonProject\venv\lib\site-packages\pyuff\datasets\dataset_58.py", line 267, in _extract58
[float(line[13 * (i + j) + 20 * (i):13 * (i + 1) + 20 * (i + j)]) \
File "C:\Users\name\PycharmProjects\pythonProject\venv\lib\site-packages\pyuff\datasets\dataset_58.py", line 267, in <listcomp>
[float(line[13 * (i + j) + 20 * (i):13 * (i + 1) + 20 * (i + j)]) \
ValueError: could not convert string to float: '000E+00 2.679853248'
During handling of the above exception, another exception occurred:
Wondering if you have any tips or pointers to put me on the right track. Thanks
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
