Skip to main content

Strip a spreadsheet of extra spaces and blank-celled rows

Project description

strip-spreadsheet

This tool is for working with spreadsheets. It cleans the spreadsheet off of any rows that have blank data in them and removes extra-spaces.

Installation

This is OS independent, meaning it won't need a specific Os to run on.

You can install the strip-spreadsheet package simply by running:

pip install strip-spreadsheet

Sample Code

from strip_spreadsheet import clean_sheet


# open the dirty sheet as a readable file
with open('x.csv', 'r') as dirty_sheet:
    # put all the rows in the sheet in a list
    unclean_sheet = dirty_sheet.readlines()

    # open the file wanna save the cleaned sheet to
    with open('x_cleaned.csv', 'w') as cleaned_up_sheet:
        # clean the unclean sheet and write the output to the new file we created
        cleaned_up_sheet.writelines(clean_sheet(unclean_sheet))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

strip-spreadsheet-1.0.0.tar.gz (1.8 kB view hashes)

Uploaded Source

Built Distribution

strip_spreadsheet-1.0.0-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page