Skip to content

Oedmafia/split-csv-file-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

split-csv-file-python (EN)

Python script to split a CSV file into smaller files.

  • You must have Python installed on your machine;

  • Within the script, you can change the number of lines that the parts should have;

  • The source file must be renamed to "base.csv" or the file name must be changed in the script to the desired one on line 14;

Setup Instructions

  1. Install virtualenv if you don't have it:

    pip install virtualenv
  2. Create a virtual environment:

    python -m venv venv
  3. Activate the virtual environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS and Linux:
      source venv/bin/activate
  4. Install the required packages:

    pip install pandas
  5. Run the script:

    python script.py

split-csv-file-python (PT-BR)

Script Python para dividir um arquivo CSV em arquivos menores.

  • Você deve ter o Python instalado na sua máquina;

  • Dentro do script, você pode alterar o número de linhas que as partes devem ter;

  • O arquivo de origem deve ser renomeado para "base.csv" ou o nome do arquivo deve ser alterado no script para o desejado na linha 14;

Instruções de Configuração

  1. Instale o virtualenv caso ainda não tenha:

    pip install virtualenv
  2. Crie um ambiente virtual:

    python -m venv venv
  3. Ative o ambiente virtual:

    • No Windows:
      venv\Scripts\activate
    • No macOS e Linux:
      source venv/bin/activate
  4. Instale os pacotes necessários:

    pip install pandas
  5. Execute o script:

    python script.py

split-csv-file-python (ES)

Script Python para dividir un archivo CSV en archivos más pequeños.

  • Debes tener Python instalado en tu máquina;

  • Dentro del script, puedes cambiar el número de líneas que deben tener las partes;

  • El archivo fuente debe ser renombrado a "base.csv" o el nombre del archivo debe ser cambiado en el script al deseado en la línea 14;

Instrucciones de Configuración

  1. Instala virtualenv si aún no lo tienes:

    pip install virtualenv
  2. Crea un entorno virtual:

    python -m venv venv
  3. Activa el entorno virtual:

    • En Windows:
      venv\Scripts\activate
    • En macOS y Linux:
      source venv/bin/activate
  4. Instala los paquetes necesarios:

    pip install pandas
  5. Ejecuta el script:

    python script.py

About

Python script to split a CSV file into smaller files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages