Scenario: Your team is working with data where dates are caputred as a string, "9/15/2019". You are tasked to create a python function named 'mdy_date' that will accept a string input, convert it to a python datetime object, and return the datetime object. Create the function in the cell below.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section8.2: Lookup Tables And The Iferror Function
Problem 6QC
icon
Related questions
Question

Scenario: Your team is working with data where dates are caputred as a string, "9/15/2019". You are tasked to create a python function named 'mdy_date' that will accept a string input, convert it to a python datetime object, and return the datetime object. Create the function in the cell below.

# write the code for your mdy_date function here:
mdy_date("9/15/2019")
# Do not change anything in this cell.
# Running this cell should return the exact output:
# datetime.datetime (2019, 9, 15, 0, 0)
NameError
<ipython-input-4-8f1f9caacf78> in <module>
---->1 mdy_date("9/15/2019")
Traceback (most recent call last)
2 # Do not change anything in this cell.
3 # Running this cell should return the exact output:
4 # datetime.datetime (2019, 9, 15, 0, 0)
NameError: name 'mdy_date' is not defined
Transcribed Image Text:# write the code for your mdy_date function here: mdy_date("9/15/2019") # Do not change anything in this cell. # Running this cell should return the exact output: # datetime.datetime (2019, 9, 15, 0, 0) NameError <ipython-input-4-8f1f9caacf78> in <module> ---->1 mdy_date("9/15/2019") Traceback (most recent call last) 2 # Do not change anything in this cell. 3 # Running this cell should return the exact output: 4 # datetime.datetime (2019, 9, 15, 0, 0) NameError: name 'mdy_date' is not defined
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage