'Data loading in Python
I am trying to read in data using numpy or pandas which has been previously aperture by some camera software. The nominal matrix is 160 x 160 pixels with the aperture switched off but when the auto aperture is on I am losing most of my data during import. I am assuming because I am not handling the whitespace or NaN's appropriately. Does anyone have any suggestions on how to handle the data with the auto aperture ON?
from tkinter import filedialog
import numpy as np
import pandas as pd
file_path = filedialog.askopenfilename()
try:
my_data2 = genfromtxt(file_path, delimiter=',')
except:
my_data2 = genfromtxt(file_path, delimiter=' ')
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|