Skip to content

Cleans up timestamp values in CSV log exports. Selects the most appropriate timestamp and converts it to ISO.

License

Notifications You must be signed in to change notification settings

dfirvault/CSV-Cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

WindowsSandboxRemoteSession_VoxTlQkyuQ image

CSV Timestamp Processor

Python License: MIT

A powerful Python tool for processing CSV files with timestamp columns, featuring both single-file and bulk processing modes with comprehensive reporting.

Available as a single click .exe or python script.

Features

  • 🕒 Automatic timestamp column detection
  • 🔄 Conversion of various timestamp formats to ISO-8601 standard
  • 📂 Two processing modes:
    • Interactive single-file mode with column verification
    • Automatic bulk processing for entire directories
  • 📊 Detailed processing statistics:
    • Lines read/written (per file and totals)
    • Files processed/skipped
    • Success/failure counts
  • 🚀 Progress bars for bulk operations
  • 📁 Flexible input/output folder selection

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/csv-timestamp-processor.git
    cd csv-timestamp-processor
  2. Install required dependencies:
    pip install -r requirements.txt

    Usage

Run the script:

python csv_timestamp_processor.py

You'll be presented with a menu:

=== CSV Timestamp Processor ===
1. Process single CSV file (interactive)
2. Bulk process CSV files (automatic)
0. Exit

Single File Mode

Select your input CSV file

Verify/select the timestamp column

Choose output directory

View processing summary

Bulk Processing Mode

Select input directory (processes all CSVs recursively)

Choose output directory

View comprehensive batch statistics

Supported Timestamp Formats

  1. Unix epoch (seconds or milliseconds)
  2. ISO-8601 formats
  3. Various datetime string formats (auto-detected)

Output Format

Processed files will:

  • Have "_processed" appended to the filename
  • Contain a new "timestamp" column as the first column
  • Preserve all original data

Requirements for python version

  • Python 3.7+
  • pandas
  • tqdm
  • tkinter (usually included with Python)

License

MIT License - see LICENSE file

Author

Jacob Wilson dfirvault@gmail.com https://github.com/dfirvault

About

Cleans up timestamp values in CSV log exports. Selects the most appropriate timestamp and converts it to ISO.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages