Metadata-Version: 1.1
Name: pyheaderfile
Version: 0.2.0
Summary: Enable handle of csv, xls and xlsx files getting column header
Home-page: https://github.com/kappius/pyheaderfile
Author: Diogo Munaro Vieira, Isvaldo Fernandes de Souza, Thiago Pereira Fernandes
Author-email: diogo.mvieira@gmail.com, isvaldo.fernandes@gmail.com, thiago.fernandes210@gmail.com
License: Apache
Download-URL: https://github.com/kappius/pyheaderfile/archive/0.2.0.tar.gz
Description: PyHeaderFile
        ************
        
        The PyHeaderFile helps the work with files that have extensions csv, xls and xlsx.
        
        This project aims **reading files over the header (column names)**. With this module we can handle **Csv, Xls and Xlsx files using same interface**. Thus, we can convert extensions, strip values in lines, change cell style of Excel files, read a specific Excel file, read an specific cell and read just some headers.
        
        Install
        =======
        
        ::
        
            pip install pyheaderfile
        
        How to use
        ==========
        
        Class csv
        ---------
        
        Read csv
        ^^^^^^^^
        
        ::
        
            file = Csv(name=’file.csv’)
            for row in file.read():
                print row  
        
        
        Set Header
        ^^^^^^^^^^
        
        ::
        
            file.header = ['col1', 'col2','col3']
        
        
        Create csv
        ^^^^^^^^^^
        
        ::
        
            file = Csv(name='filename.csv', header=['col1','col2','col3'])
        
        
        Write list csv
        ^^^^^^^^^^^^^^
        
        ::
        
            file.write(['col1','col2','col3'])
        
        
        Write dict csv
        ^^^^^^^^^^^^^^
        
        ::
        
            file.write(dict(header=value))
        
        Class Xls
        ---------
        
        Read xls
        ^^^^^^^^
        
        ::
        
            file = Xls(name=’file.xls’)
            for row in file.read():
                print row  
        
        
        Set Header
        ^^^^^^^^^^
        
        ::
        
            file.header = ['col1', 'col2','col3']
        
        
        Create xls
        ^^^^^^^^^^
        
        ::
        
            file = Xls(name='filename.xls', header=['col1','col2','col3'])
        
        
        Write list
        ^^^^^^^^^^
        
        ::
        
            file.write(['col1','col2','col3'])
        
        
        Write dict
        ^^^^^^^^^^
        
        ::
        
            file.write(dict(header=value))
        
        
        Class Xlsx
        ----------
        
        Read
        ^^^^
        
        ::
        
            file = Xlsx(name=’file.xlsx’)
            for row in file.read():
                print row  
        
        
        Set Header
        ^^^^^^^^^^
        
        ::
        
            file.header = ['col1', 'col2','col3']
        
        
        Create file
        ^^^^^^^^^^^
        
        ::
        
            file = Xlsx(name='filename.xlsx', header=['col1','col2','col3'])
        
        
        Write list
        ^^^^^^^^^^
        
        ::
        
            file.write(['col_val1','col_val2','col_val3'])
        
        
        Write dict
        ^^^^^^^^^^
        
        ::
        
            file.write(dict(header=value))
        
        
        Save file
        ^^^^^^^^^
        
        ::
        
            file.save()
        
        Modifying extensions, name and header
        -------------------------------------
        
        ::
        
            q = Xls()
            x = Xlsx(name='filename.xlsx')
            x.name = 'file'
            x.header = ['col1', 'col2','col3']
            q(x)
        
Keywords: xls,excel,spreadsheet,workbook,xlsx,csv,txt
Platform: UNKNOWN
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Database
Classifier: Topic :: Office/Business
Classifier: Topic :: Software Development :: Libraries :: Python Modules
