Revert cache decorator name
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ st.write("_Data Analysis_ Tool")
|
|
18 |
p = st.write
|
19 |
print = st.write
|
20 |
|
21 |
-
@st.
|
22 |
def _read_csv(f, **kwargs):
|
23 |
df = pd.read_csv(f, on_bad_lines="skip", **kwargs)
|
24 |
# clean
|
@@ -125,7 +125,7 @@ def code_editor(language, hint, show_panel, key=None):
|
|
125 |
return content
|
126 |
|
127 |
|
128 |
-
@st.
|
129 |
def query_data(sql, df):
|
130 |
try:
|
131 |
return duckdb.query(sql).df()
|
@@ -175,7 +175,7 @@ def run_python_script(user_script, key):
|
|
175 |
st.exception(e)
|
176 |
|
177 |
|
178 |
-
@st.
|
179 |
def data_profiler(df):
|
180 |
return ProfileReport(df, title="Profiling Report")
|
181 |
|
|
|
18 |
p = st.write
|
19 |
print = st.write
|
20 |
|
21 |
+
@st.cache
|
22 |
def _read_csv(f, **kwargs):
|
23 |
df = pd.read_csv(f, on_bad_lines="skip", **kwargs)
|
24 |
# clean
|
|
|
125 |
return content
|
126 |
|
127 |
|
128 |
+
@st.cache
|
129 |
def query_data(sql, df):
|
130 |
try:
|
131 |
return duckdb.query(sql).df()
|
|
|
175 |
st.exception(e)
|
176 |
|
177 |
|
178 |
+
@st.experimental_singleton
|
179 |
def data_profiler(df):
|
180 |
return ProfileReport(df, title="Profiling Report")
|
181 |
|