title: How to convert a datetime-String with a comma (,) in the milliseconds part in python/pandas?
body: <p>I got the following problem:</p>
  
  <p>The date-time columns from my data got the following time-format (the columns are "Date" <code>dd.mm.yyyy</code> and "Time" <code>hh:mm:ss.fff,f</code>):</p>
  
  <pre><code>01.03.2019  12:29:15.732,7
  </code></pre>
  
  <p>I looked around but I couldn't find a formatting-option which deals with the part behind the comma (after the milliseconds).
  A source which didn't help me:
  <a href="https://docs.python.org/2/library/datetime.html" rel="nofollow noreferrer">https://docs.python.org/2/library/datetime.html</a></p>
  
  <p>I am reading the csv-file in with python3 and <code>pd.read_csv()</code>.</p>
  
  <p>I got the following work-around which truncates the comma and the cipher behind it.</p>
  
  <p>It is terribly slow because of the truncation of over 50000 strings in my dataset:</p>
  
  <pre class="lang-py prettyprint-override"><code>data = pd.read_csv('xyz.csv', sep=';', low_memory = False, parse_dates = [['Date', 'Time']], 
                     date_parser = lambda x, y : pd.to_datetime((x + ' ' + y)[:23], format='%d.%m.%Y %H:%M:%S.%f'))
  </code></pre>
  
  <p>What I want is to use a string-formatting which deals with the comma, either by discarding the whole milliseconds part or by converting it correctly to microseconds.</p>
  
  <p>Sidenote: With R I simply used <code>"%d.%m.%Y %H:%M:%S"</code> which discarded the milliseconds without throwing an error.</p>