Spaces:
Sleeping
Sleeping
getting df correctly (#40)
Browse files- getting df correctly (b2c3525a9f4f00c6fbaa0d9add03c139188e8442)
app.py
CHANGED
|
@@ -77,17 +77,26 @@ st.text('Chart A Future Edits: Order bars by mean YTD Gross, Make all position t
|
|
| 77 |
#im just going to relaod the data frame in to clean up the text on the bottomo charts
|
| 78 |
df_j = pd.read_csv('State_Employee_Pay.csv')
|
| 79 |
|
|
|
|
| 80 |
df_jcopy = df_j.copy()
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
import altair as alt
|
| 93 |
import pandas as pd
|
|
|
|
| 77 |
#im just going to relaod the data frame in to clean up the text on the bottomo charts
|
| 78 |
df_j = pd.read_csv('State_Employee_Pay.csv')
|
| 79 |
|
| 80 |
+
|
| 81 |
df_jcopy = df_j.copy()
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
df_jcopy['Period Pay Rate'] = df_jcopy['Period Pay Rate'].str.replace(",", "").astype(int)
|
| 85 |
+
df_jcopy['YTD Gross'] = df_jcopy['YTD Gross'].str.replace(",", "").astype(int)
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
df_jcopy = df_jcopy.dropna()
|
| 89 |
+
df_jcopy = df_jcopy[df_jcopy['YTD Gross'] != 0]
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
df_jcopy['Agency'] = df_jcopy['Agency'].str.lower()
|
| 93 |
+
df_jcopy['Agency Division'] = df_jcopy['Agency Division'].str.lower()
|
| 94 |
+
df_jcopy['Employee Name'] = df_jcopy['Employee Name'].str.lower()
|
| 95 |
+
df_jcopy['Position Title'] = df_jcopy['Position Title'].str.lower()
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
df_jcopy.columns = df_jcopy.columns.str.strip()
|
| 99 |
+
|
| 100 |
|
| 101 |
import altair as alt
|
| 102 |
import pandas as pd
|