Fix tempe file issue
Browse files- apps/researcher.py +2 -1
apps/researcher.py
CHANGED
@@ -4,6 +4,7 @@ import pandas as pd
|
|
4 |
import streamlit as st
|
5 |
import leafmap.foliumap as leafmap
|
6 |
import plotly.express as px
|
|
|
7 |
|
8 |
if "dsl" not in st.session_state:
|
9 |
st.session_state["dsl"] = scholarpy.Dsl()
|
@@ -20,7 +21,7 @@ def json_to_df(json_data, transpose=False):
|
|
20 |
if transpose:
|
21 |
df = df.transpose()
|
22 |
|
23 |
-
out_csv =
|
24 |
df.to_csv(out_csv, index=transpose)
|
25 |
df = pd.read_csv(out_csv)
|
26 |
os.remove(out_csv)
|
|
|
4 |
import streamlit as st
|
5 |
import leafmap.foliumap as leafmap
|
6 |
import plotly.express as px
|
7 |
+
from leafmap.common import temp_file_path
|
8 |
|
9 |
if "dsl" not in st.session_state:
|
10 |
st.session_state["dsl"] = scholarpy.Dsl()
|
|
|
21 |
if transpose:
|
22 |
df = df.transpose()
|
23 |
|
24 |
+
out_csv = temp_file_path(".csv")
|
25 |
df.to_csv(out_csv, index=transpose)
|
26 |
df = pd.read_csv(out_csv)
|
27 |
os.remove(out_csv)
|