/Read-Headers-CSV-python

Python script to read first line of csv files.

Primary LanguageJupyter NotebookApache License 2.0Apache-2.0

Read-Headers-CSV-python

Python script to read first line of csv files and get the total amount of lines in the file.

Background

Have a large file that you need to view the headers? This simple script reads the headers without opening the file in notepad or Excel. Use this if you have a large csv that needs it's headers examined.

Usage

This script works with Python 3.X.

####Running the Script

  1. Open your favorite IDE or Notepad and provide the path to your CSV in the filename variable.
  2. Save the file
  3. Run the Read-Headers-CSV-python.py script by doing one of the following:
  • Run in the IDE.
  • Double Click in Windows Explorer.
  • Run by navigating to the folder in the command line.

####Output The output of the script will be the names of the headers in the csv file as well as the number of lines including the headers

['These', 'Are' , 'Sample', 'Headers']
10 Total lines and headers
Press any key to continue...