We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83d5946 commit 6bcb9b7Copy full SHA for 6bcb9b7
loadDataFilesUI.py
@@ -1,5 +1,5 @@
1
from PyQt5 import QtCore, QtWidgets, uic
2
-
+import pandas as pd
3
import os
4
5
class LoadDataFilesUI(QtWidgets.QWidget):
@@ -55,6 +55,22 @@ def openFile(self):
55
print(datafile[-4:])
56
if datafile[-4:]=='.csv':
57
self.commaRB.setChecked(True)
58
+ df = pd.read_csv(self.dataFileName, nrows=1)
59
+
60
+ # print(df)
61
+ timestring = df.iloc[0,0]
62
+ ncolon = timestring.count(':')
63
+ if ncolon==2:
64
+ self.datetimeFormatLE.setCurrentIndex(0)
65
+ elif ncolon==1:
66
+ self.datetimeFormatLE.setCurrentIndex(1)
67
+ else:
68
+ nspace = timestring.count(' ')
69
+ if nspace==1:
70
+ self.datetimeFormatLE.setCurrentIndex(2)
71
72
+ self.datetimeFormatLE.setCurrentIndex(3)
73
74
pass
75
76
def loadFile(self):
0 commit comments