Skip to content

Instantly share code, notes, and snippets.

@MoGaber
Created December 14, 2020 04:58
Show Gist options
  • Save MoGaber/9731751323298ab7df4649f02f1768ae to your computer and use it in GitHub Desktop.
Save MoGaber/9731751323298ab7df4649f02f1768ae to your computer and use it in GitHub Desktop.
convert_datatime
# turn the asnwer added data to datetime value instead of a string (while ignoring the NAs)
indices = full_data["answers_date_added"][full_data["answers_date_added"].notnull()].index.values
full_data.loc[indices, "answers_date_added"] = full_data["answers_date_added"][full_data["answers_date_added"].notnull()].apply(date_vectorizer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment