Skip to content
Advertisement

Tag: string-to-datetime

Python Pandas to_datetime Without Zero Padded

I am trying to convert a date & time string using Pandas ‘to_datetime’, but the string values is non-zero padded: I have the following but get a mismatch error Is there a way to add the zero padding or have ‘to_datetime’ accept the above formatting? Answer The trouble isn’t in the padding, it’s actually in your formatting call. Note the

Advertisement