data science FAQ's

Can you stack two series horizontally? if so, how?

Yes, we can stack the two series horizontally using concat() function and setting axis = 1.df = pd.concat([s1, s2], axis=1)

Q.8 How can you convert date-strings to timeseries in a series?

Input:s = pd.Series([’02 Feb 2011′, ’02-02-2013′, ‘20160104’, ‘2011/01/04’, ‘2014-12-05’, ‘2010-06-06T12:05])

To solve this, we will use the to_datetime() function.pd.to_datetime(s)

Leave a Reply

Your email address will not be published. Required fields are marked *