Spaces:
Running
Running
fix srme unit
Browse files
serve/ranks/thermal-conductivity.py
CHANGED
@@ -11,33 +11,33 @@ table = pd.read_csv(DATA_DIR / "wte.csv")
|
|
11 |
table.rename(
|
12 |
columns={
|
13 |
"method": "Model",
|
14 |
-
"srme": "SRME [
|
15 |
},
|
16 |
inplace=True,
|
17 |
)
|
18 |
|
19 |
table.set_index("Model", inplace=True)
|
20 |
|
21 |
-
table.sort_values(["SRME [
|
22 |
|
23 |
-
table["Rank"] = table["SRME [
|
24 |
|
25 |
table = table.reindex(
|
26 |
columns=[
|
27 |
"Rank",
|
28 |
-
"SRME [
|
29 |
]
|
30 |
)
|
31 |
|
32 |
s = (
|
33 |
table.style.background_gradient(
|
34 |
-
cmap="Reds", subset=["SRME [
|
35 |
)
|
36 |
.background_gradient(
|
37 |
cmap="Blues",
|
38 |
subset=["Rank"],
|
39 |
)
|
40 |
-
.format("{:.3f}", subset=["SRME [
|
41 |
)
|
42 |
|
43 |
|
|
|
11 |
table.rename(
|
12 |
columns={
|
13 |
"method": "Model",
|
14 |
+
"srme": "SRME [1/Å]",
|
15 |
},
|
16 |
inplace=True,
|
17 |
)
|
18 |
|
19 |
table.set_index("Model", inplace=True)
|
20 |
|
21 |
+
table.sort_values(["SRME [1/Å]"], ascending=True, inplace=True)
|
22 |
|
23 |
+
table["Rank"] = table["SRME [1/Å]"].rank(method='min').astype(int)
|
24 |
|
25 |
table = table.reindex(
|
26 |
columns=[
|
27 |
"Rank",
|
28 |
+
"SRME [1/Å]",
|
29 |
]
|
30 |
)
|
31 |
|
32 |
s = (
|
33 |
table.style.background_gradient(
|
34 |
+
cmap="Reds", subset=["SRME [1/Å]"]
|
35 |
)
|
36 |
.background_gradient(
|
37 |
cmap="Blues",
|
38 |
subset=["Rank"],
|
39 |
)
|
40 |
+
.format("{:.3f}", subset=["SRME [1/Å]"])
|
41 |
)
|
42 |
|
43 |
|
serve/tasks/thermal-conductivity.py
CHANGED
@@ -26,21 +26,21 @@ table = pd.read_csv(DATA_DIR / "wte.csv")
|
|
26 |
table.rename(
|
27 |
columns={
|
28 |
"method": "Model",
|
29 |
-
"srme": "SRME [
|
30 |
},
|
31 |
inplace=True,
|
32 |
)
|
33 |
|
34 |
table.set_index("Model", inplace=True)
|
35 |
|
36 |
-
table.sort_values(["SRME [
|
37 |
|
38 |
s = table.style.background_gradient(
|
39 |
-
cmap="Reds", subset=["SRME [
|
40 |
)
|
41 |
|
42 |
st.dataframe(
|
43 |
s,
|
44 |
use_container_width=True,
|
45 |
-
column_config={"SRME [
|
46 |
)
|
|
|
26 |
table.rename(
|
27 |
columns={
|
28 |
"method": "Model",
|
29 |
+
"srme": "SRME [1/Å]",
|
30 |
},
|
31 |
inplace=True,
|
32 |
)
|
33 |
|
34 |
table.set_index("Model", inplace=True)
|
35 |
|
36 |
+
table.sort_values(["SRME [1/Å]"], ascending=True, inplace=True)
|
37 |
|
38 |
s = table.style.background_gradient(
|
39 |
+
cmap="Reds", subset=["SRME [1/Å]"]
|
40 |
)
|
41 |
|
42 |
st.dataframe(
|
43 |
s,
|
44 |
use_container_width=True,
|
45 |
+
column_config={"SRME [1/Å]": {"format": "{:.3f}"}}
|
46 |
)
|