Spaces:
Sleeping
Sleeping
Update Quality_Control.py
Browse files- Quality_Control.py +3 -19
Quality_Control.py
CHANGED
@@ -14,6 +14,8 @@ import numpy as np
|
|
14 |
import json
|
15 |
import panel as pn
|
16 |
import pandas as pd
|
|
|
|
|
17 |
import random
|
18 |
import asyncio
|
19 |
import matplotlib.pyplot as plt
|
@@ -178,13 +180,6 @@ print('metadata_images_dir :', metadata_images_dir)
|
|
178 |
#ls_samples = [sample for sample in os.listdir(input_data_dir) if sample.endswith(".csv")]
|
179 |
print("The following CSV files were detected:\n\n",[sample for sample in ls_samples], "\n\nin", input_data_dir, "directory.")
|
180 |
|
181 |
-
|
182 |
-
# In[26]:
|
183 |
-
|
184 |
-
|
185 |
-
import os
|
186 |
-
import pandas as pd
|
187 |
-
|
188 |
def combine_and_save_metadata_files(metadata_dir, selected_metadata_files):
|
189 |
if len(selected_metadata_files) == []:
|
190 |
if not file:
|
@@ -253,9 +248,7 @@ print("df :\n", df.head(), "\n")
|
|
253 |
print("df's columns :\n", df.columns, "\n")
|
254 |
print("df's index :\n", df.index, "\n")
|
255 |
print("df's index name :\n", df.index.name)
|
256 |
-
|
257 |
df.head()
|
258 |
-
|
259 |
# Verify that the ID column in input file became the index
|
260 |
# Verify that the index name column is "ID", if not, rename it
|
261 |
if df.index.name != "ID":
|
@@ -283,12 +276,6 @@ print("\ndf :\n", df.head(), "\n")
|
|
283 |
print("df's columns :\n", df.columns, "\n")
|
284 |
print("df's index :\n", df.index, "\n")
|
285 |
print("df's index name :\n", df.index.name)
|
286 |
-
|
287 |
-
df.head()
|
288 |
-
|
289 |
-
|
290 |
-
df.head()
|
291 |
-
|
292 |
print("Used " + ls_samples[0] + " to determine the expected and corrected headers for all files.\n")
|
293 |
print("These headers are: \n" + ", ".join([h for h in expected_headers]))
|
294 |
|
@@ -1682,7 +1669,4 @@ app = pn.template.GoldenTemplate(
|
|
1682 |
),
|
1683 |
])
|
1684 |
|
1685 |
-
app.servable()
|
1686 |
-
|
1687 |
-
if __name__ == "__main__":
|
1688 |
-
pn.serve(app, port=5007)
|
|
|
14 |
import json
|
15 |
import panel as pn
|
16 |
import pandas as pd
|
17 |
+
import os
|
18 |
+
import pandas as pd
|
19 |
import random
|
20 |
import asyncio
|
21 |
import matplotlib.pyplot as plt
|
|
|
180 |
#ls_samples = [sample for sample in os.listdir(input_data_dir) if sample.endswith(".csv")]
|
181 |
print("The following CSV files were detected:\n\n",[sample for sample in ls_samples], "\n\nin", input_data_dir, "directory.")
|
182 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
183 |
def combine_and_save_metadata_files(metadata_dir, selected_metadata_files):
|
184 |
if len(selected_metadata_files) == []:
|
185 |
if not file:
|
|
|
248 |
print("df's columns :\n", df.columns, "\n")
|
249 |
print("df's index :\n", df.index, "\n")
|
250 |
print("df's index name :\n", df.index.name)
|
|
|
251 |
df.head()
|
|
|
252 |
# Verify that the ID column in input file became the index
|
253 |
# Verify that the index name column is "ID", if not, rename it
|
254 |
if df.index.name != "ID":
|
|
|
276 |
print("df's columns :\n", df.columns, "\n")
|
277 |
print("df's index :\n", df.index, "\n")
|
278 |
print("df's index name :\n", df.index.name)
|
|
|
|
|
|
|
|
|
|
|
|
|
279 |
print("Used " + ls_samples[0] + " to determine the expected and corrected headers for all files.\n")
|
280 |
print("These headers are: \n" + ", ".join([h for h in expected_headers]))
|
281 |
|
|
|
1669 |
),
|
1670 |
])
|
1671 |
|
1672 |
+
app.servable()
|
|
|
|
|
|