pandas - How to convert datetime.time columns in dataframe to string -


i've been struggling convert 2 columns in pandas. frame contains many columns, , 2 columns dates: 'datelog'(is date) , 'timeofday' (is time). column datelog string. column timeofday datetime.time() format. dateframe display folows:

     datelog timeofday 0  30-apr-15  14:15:43 1  30-apr-15  14:16:13 2  30-apr-15  14:16:43 3  30-apr-15  14:17:13 4  30-apr-15  14:17:43 5  30-apr-15  14:18:13 6  30-apr-15  14:18:43 7  30-apr-15  14:19:13 8  30-apr-15  14:19:43 9  30-apr-15  14:20:13 

my goal concatenate these 2 column use them index timeseries. can point me in right direction?

i think can use create index:

df.index = df['datelog'] + ' ' + df['timeofday'].astype(str) 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -