[Python] Importing CSV after initially exporting datetime output (without using pandas)...

Discussão em 'Python' iniciado por Stack, Junho 18, 2025.

  1. Stack

    Stack Membro Participativo

    I use the following to write CSV lines in a loop while running sensor instrumentation, and I want to read them back in for post-processing without pandas. I would like to use the imported data to plot, and do basic arithmetic on the time stamp column, e.g. calculate time separation between events captured by a sensor.

    from datetime import datetime

    date_time = datetime.now()

    filename.write(str(date_time)+','+str(SensorData1)+','+str(SensorData2))


    Each line of the CSV output looks like this:

    2025-06-01 19:05:24.384927,8.001,4.999

    Continue reading...

Compartilhe esta Página