title: How to split Date, Month, date, hour, minute, second in column
body: <p><a href="https://i.stack.imgur.com/Yib9Q.png" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>I have a .log file with long list of datetime and would like to split them to column: year, month, date, hour, minute, second, millisecond. Following is a part of list data I need to split:</p>
  
  <pre><code>2015-07-15 20:51:40
  2015-07-15 20:51:30
  2015-07-15 20:51:20
  2015-07-15 20:51:10
  2015-07-15 20:51:00
  2015-07-15 20:50:50
  2015-07-15 20:50:49
  </code></pre>
  
  <p>But when I write the following code, it shows that and millisecond doesn't happen: </p>
  
  <blockquote>
    <p>"AttributeError: 'list' object has no attribute 'read'"</p>
  </blockquote>
  
  <p>just one row works:</p>
  
  <pre><code>t2  int  2014
  t3  int  7
  t4  int  14
  t5  int  21
  t6  int  0
  t7  int  10
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>Day Month Year Hour Minute Second Millisecond
  15 07 2015 20 51 40
  15 07 2015 20 51 30
  15 07 2015 20 51 20
  15 07 2015 20 51 10
  15 07 2015 20 51 00
  15 07 2015 20 50 50
  15 07 2015 20 50 40
  </code></pre>
  
  <p>Here is code i used:</p>
  
  <pre><code>from datetime import datetime
  from tkinter.filedialog import askopenfilename
  dirname=askopenfilename( initialdir='/.log', title= 'please select a directory')
  j=pd.read_csv(dirname, header=None, sep=r";")
  t1=j[j.columns[0]]
  for date_column in t1:
      date_text = datetime.strptime(date_column, '%Y-%m-%d  %H:%M:%S')
      d = date_text
      t2 = d.year
      t3 = d.month
      t4 = d.day
      t5 = d.hour
      t6 = d.minute
      t7 = d.second
      t8 = d.millisecond
  </code></pre>