Mainwindow: Fix table export.
parent
477ad00cf8
commit
5cf87a5e7b
|
|
@ -39,6 +39,7 @@ from View.about_window import AboutWindow
|
||||||
import settings as stg
|
import settings as stg
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
import pandas as pd
|
||||||
from subprocess import Popen
|
from subprocess import Popen
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
@ -363,15 +364,19 @@ class Ui_MainWindow(object):
|
||||||
stg.BS_raw_data_reshape[i][:, freq_ind]))
|
stg.BS_raw_data_reshape[i][:, freq_ind]))
|
||||||
))
|
))
|
||||||
|
|
||||||
exec("DataFrame_acoustic_" + str(i) + "= pd.DataFrame(None)")
|
DataFrame_acoustic = pd.DataFrame(None)
|
||||||
exec("DataFrame_acoustic_" + str(i) + "= pd.DataFrame(data=table_data.transpose(), columns=header_list)")
|
DataFrame_acoustic = pd.DataFrame(
|
||||||
|
data=table_data.transpose(), columns=header_list
|
||||||
|
)
|
||||||
|
|
||||||
exec("DataFrame_acoustic_" + str(i) + ".to_csv(" +
|
DataFrame_acoustic.to_csv(
|
||||||
"path_or_buf=" +
|
path_or_buf=os.path.join(
|
||||||
"'" + name + "/" + "Table_" +
|
name,
|
||||||
str(stg.filename_BS_raw_data[i][:-4]) + ".csv'" + ", " +
|
f"Table_{str(stg.filename_BS_raw_data[i][:-4])}.csv"
|
||||||
"sep=" + "',' " + ", " +
|
),
|
||||||
"header=DataFrame_acoustic_" + str(i) + ".columns" + ")")
|
header=DataFrame_acoustic.columns,
|
||||||
|
sep=',',
|
||||||
|
)
|
||||||
|
|
||||||
t1 = time.time() - t0
|
t1 = time.time() - t0
|
||||||
print("time duration export BS ", t1)
|
print("time duration export BS ", t1)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue