Skip to content

Commit 3f12cd4

Browse files
authored
Merge pull request #153 from ebmdatalab/Broken-Date-Fix
Update get_trials_from_db.py
2 parents a0fee05 + ddfda83 commit 3f12cd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

euctr/euctr/management/commands/get_trials_from_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def load_data_into_pandas(db, sufficiently_old):
7676

7777
def cleanup_dataset(euctr_cond):
7878
"""cleaning up the condensed EUCTR dataset and adding the false conditions"""
79-
euctr_cond['date_of_the_global_end_of_the_trial'] = pd.to_datetime(euctr_cond['date_of_the_global_end_of_the_trial'])
79+
euctr_cond['date_of_the_global_end_of_the_trial'] = pd.to_datetime(euctr_cond['date_of_the_global_end_of_the_trial'], errors = 'coerce')
8080
euctr_cond['trial_is_part_of_a_paediatric_investigation_plan'] = (euctr_cond['trial_is_part_of_a_paediatric_investigation_plan'] == True).astype(int)
8181
euctr_cond['trial_human_pharmacology_phase_i'] = (euctr_cond['trial_human_pharmacology_phase_i']== True).astype(int)
8282
euctr_cond['trial_therapeutic_exploratory_phase_ii'] = (euctr_cond['trial_therapeutic_exploratory_phase_ii']== True).astype(int)

0 commit comments

Comments
 (0)