Supposed the 'date' column in the DataFrame shown has a dtype of object (i.e. string). How can it be converted to Pandas's datetime64 datatype?单项选择题

A

df['date']=pd.to_datetime(df['date'],format='%Y').year

B

df['date']=pd.to_datetime(df['date'],format='%Y').dt.year

C

df['date']=pd.to_datetime(df['date'],format='%Y')

D

df['date']=pd.to_datetime(df['date'],format='%y')

登录即可查看完整答案

我们收录了全球超50000道真实原题与详细解析,现在登录,立即获得答案。

类似问题

 You have an employees table with the following columns: employeeId startDate (recorded as VARCHAR(255), storing both date and time of first entry) endDate (recorded as VARCHAR(255) as well) The startDate column is automatically filled when an employee first uses their card to enter the building. It records the date and time of their first entry. Last week, an accident occurred early in the morning, and the compliance team is investigating who was present at the time. To do this, you need to check when new employees arrived to determine who was in the building. Specifically, you want to verify whether new employees arrived before or after the accident. Which of the following is true?

Question 30 Choose a, b, c or d as the best answer. The author’s main argument is that the 100:80:100 model __________.

The 100:80:100 model will most likely 25. ____ to more fields of work with productivity improvements. Businesses which continue with the traditional working week could have 26. ____ , and may be forced to agree to the model. They would need to do this to stay 27.____. The advantages of a reduced working week have been revealed by 28. ____ businesses. Future trials of the concept must include those 29. Answer Question 17[input] not surveyed in the first round.

The 100:80:100 model will most likely 25. ____ to more fields of work with productivity improvements. Businesses which continue with the traditional working week could have 26. ____ , and may be forced to agree to the model. They would need to do this to stay 27. ____. The advantages of a reduced working week have been revealed by 28. Answer Question 16[input] businesses. Future trials of the concept must include those 29. _________ not surveyed in the first round.

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!