Spaces:
Sleeping
Sleeping
fschwartzer
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -7,15 +7,15 @@ import datetime
|
|
7 |
# Load the CSV file
|
8 |
df = pd.read_csv("anomalies.csv", quotechar='"')
|
9 |
|
10 |
-
df.rename(columns={"ds": "Ano e mês", "real": "
|
11 |
|
12 |
print(df)
|
13 |
|
14 |
# Filter 'real' higher than 10 Million
|
15 |
-
df= df[df['
|
16 |
|
17 |
# Convert 'real' column to standard float format and then to strings
|
18 |
-
df['
|
19 |
|
20 |
# Fill NaN values and convert all columns to strings
|
21 |
df = df.fillna('').astype(str)
|
|
|
7 |
# Load the CSV file
|
8 |
df = pd.read_csv("anomalies.csv", quotechar='"')
|
9 |
|
10 |
+
df.rename(columns={"ds": "Ano e mês", "real": "Valor Monetário", "group": "Grupo"}, inplace=True)
|
11 |
|
12 |
print(df)
|
13 |
|
14 |
# Filter 'real' higher than 10 Million
|
15 |
+
df= df[df['Valor Monetário'] >= 1000000.]
|
16 |
|
17 |
# Convert 'real' column to standard float format and then to strings
|
18 |
+
df['Valor Monetário'] = df['Valor Monetário'].apply(lambda x: f"{x:.2f}")
|
19 |
|
20 |
# Fill NaN values and convert all columns to strings
|
21 |
df = df.fillna('').astype(str)
|