using aggrid in gps converter
Browse files- apps/gps_converter.py +16 -1
apps/gps_converter.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import pandas as pd
|
2 |
import streamlit as st
|
3 |
from lat_lon_parser import parse, to_str_deg_min_sec
|
|
|
4 |
|
5 |
|
6 |
class DataFrames:
|
@@ -64,7 +65,21 @@ if uploaded_file is not None:
|
|
64 |
|
65 |
DataFrames.Dframe = df
|
66 |
st.success("Coordinates converted Sucessfully")
|
67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
except Exception as e:
|
69 |
st.error(
|
70 |
f"An error occurred. Make sure the file contains the latitude and longitude columns. Error: {e}"
|
|
|
1 |
import pandas as pd
|
2 |
import streamlit as st
|
3 |
from lat_lon_parser import parse, to_str_deg_min_sec
|
4 |
+
from st_aggrid import AgGrid
|
5 |
|
6 |
|
7 |
class DataFrames:
|
|
|
65 |
|
66 |
DataFrames.Dframe = df
|
67 |
st.success("Coordinates converted Sucessfully")
|
68 |
+
|
69 |
+
@st.fragment
|
70 |
+
def table_data():
|
71 |
+
if DataFrames.Dframe is not None:
|
72 |
+
AgGrid(
|
73 |
+
DataFrames.Dframe,
|
74 |
+
fit_columns_on_grid_load=True,
|
75 |
+
theme="streamlit",
|
76 |
+
enable_enterprise_modules=True,
|
77 |
+
filter=True,
|
78 |
+
# columns_auto_size_mode=ColumnsAutoSizeMode.FIT_CONTENTS,
|
79 |
+
)
|
80 |
+
|
81 |
+
table_data()
|
82 |
+
|
83 |
except Exception as e:
|
84 |
st.error(
|
85 |
f"An error occurred. Make sure the file contains the latitude and longitude columns. Error: {e}"
|