Python pandas Excel
dn
PythonList at DancesWithMice.info
Fri Jul 17 20:16:35 EDT 2020
On 18/07/20 11:06 AM, Dennis Lee Bieber wrote:
> On Sat, 18 Jul 2020 09:08:50 +1200, dn via Python-list
> <python-list at python.org> declaimed the following:
>
>> Assuming the import produces a string, are you able to "slice" the
>> string into the requisite components?
>
> Given the OP's stated output -- I would suspect they are being
> imported/parsed as DateTime objects. Which is quite likely also what the
> column is defined to be in Excel.
Agreed, but the lack of 'how' information reduces us to guessing...
TBH in this mode, I tend to reduce a DateTime to a string and deal with
it that way; whereas the 'official' answer is likely to use DateTime
methods to extract the requisite sub-items.
(I've not stopped to perform a speed-comparison, so it's as basic as
what I 'see' as the more simple option)
More importantly, if that lack indicates that the OP hasn't ascertained
such details, the earlier questions must be answered before the
finer-details.
--
Regards =dn
More information about the Python-list
mailing list