Spaces:
Running
Running
Update storylines-app_plotly_version.py
Browse files
storylines-app_plotly_version.py
CHANGED
|
@@ -10,6 +10,7 @@ import plotly.express as px
|
|
| 10 |
# Load the CSV file
|
| 11 |
df = pd.read_csv("https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/ETOHA/storylines/emdat2.csv", sep=',', header=0,
|
| 12 |
dtype=str, encoding='utf-8')
|
|
|
|
| 13 |
|
| 14 |
|
| 15 |
def try_parse_date(y, m, d):
|
|
|
|
| 10 |
# Load the CSV file
|
| 11 |
df = pd.read_csv("https://jeodpp.jrc.ec.europa.eu/ftp/jrc-opendata/ETOHA/storylines/emdat2.csv", sep=',', header=0,
|
| 12 |
dtype=str, encoding='utf-8')
|
| 13 |
+
df = df.drop_duplicates(subset='DisNo.', keep='first') #I drop all duplicates for column "DisNo.", keeping the first occurrence
|
| 14 |
|
| 15 |
|
| 16 |
def try_parse_date(y, m, d):
|