Codebase list pyexcel / 69aa864 docs / source / api.rst
69aa864

Tree @69aa864 (Download .tar.gz)

api.rst @69aa864view markup · raw · history · blame

API Reference

System Message: INFO/1 (<string>, line 6)

No directive entry for "currentmodule" in module "docutils.parsers.rst.languages.en". Trying "currentmodule" as canonical directive name.

System Message: ERROR/3 (<string>, line 6)

Unknown directive type "currentmodule".

.. currentmodule:: pyexcel

This is intended for users of pyexcel.

Signature functions

Obtaining data from excel file

System Message: INFO/1 (<string>, line 23)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 23)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   get_array
   get_dict
   get_records
   get_book_dict
   get_book
   get_sheet
   iget_book
   iget_array
   iget_records
   free_resources

Saving data to excel file

System Message: INFO/1 (<string>, line 42)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 42)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   save_as
   isave_as
   save_book_as
   isave_book_as


These flags can be passed on all signature functions:

auto_detect_int

Automatically convert float values to integers if the float number has no decimal values(e.g. 1.00). By default, it does the detection. Setting it to False will turn on this behavior

It has no effect on pyexcel-xlsx because it does that by default.

auto_detect_float

Automatically convert text to float values if possible. This applies only pyexcel-io where csv, tsv, csvz and tsvz formats are supported. By default, it does the detection. Setting it to False will turn on this behavior

auto_detect_datetime

Automatically convert text to python datetime if possible. This applies only pyexcel-io where csv, tsv, csvz and tsvz formats are supported. By default, it does the detection. Setting it to False will turn on this behavior

library

Name a pyexcel plugin to handle a file format. In the situation where multiple plugins were pip installed, it is confusing for pyexcel on which plugin to handle the file format. For example, both pyexcel-xlsx and pyexcel-xls reads xlsx format. Now since version 0.2.2, you can pass on library="pyexcel-xls" to handle xlsx in a specific function call.

It is better to uninstall the unwanted pyexcel plugin using pip if two plugins for the same file type are not absolutely necessary.

Cookbook

System Message: INFO/1 (<string>, line 95)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 95)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   merge_csv_to_a_book
   merge_all_to_a_book
   split_a_book
   extract_a_sheet_from_a_book


Book

Here's the entity relationship between Book, Sheet, Row and Column

entity-relationship-diagram.png

Constructor

System Message: INFO/1 (<string>, line 114)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 114)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Book

Attribute

System Message: INFO/1 (<string>, line 122)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 122)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Book.number_of_sheets
   Book.sheet_names

Conversions

System Message: INFO/1 (<string>, line 131)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 131)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Book.bookdict
   Book.url
   Book.csv
   Book.tsv
   Book.csvz
   Book.tsvz
   Book.xls
   Book.xlsm
   Book.xlsx
   Book.ods
   Book.stream

Save changes

System Message: INFO/1 (<string>, line 149)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 149)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Book.save_as
   Book.save_to_memory
   Book.save_to_database
   Book.save_to_django_models

Sheet

Constructor

System Message: INFO/1 (<string>, line 162); backlink

Duplicate implicit target name: "constructor".

System Message: INFO/1 (<string>, line 164)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 164)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet


Attributes

System Message: INFO/1 (<string>, line 173)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 173)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.content
   Sheet.number_of_rows
   Sheet.number_of_columns
   Sheet.row_range
   Sheet.column_range


Cell access

System Message: INFO/1 (<string>, line 186)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 186)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.cell_value
   Sheet.__getitem__

Row access

System Message: INFO/1 (<string>, line 195)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 195)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.row_at
   Sheet.set_row_at
   Sheet.delete_rows
   Sheet.extend_rows

Column access

System Message: INFO/1 (<string>, line 206)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 206)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.column_at
   Sheet.set_column_at
   Sheet.delete_columns
   Sheet.extend_columns


Data series

Any column as row name

System Message: INFO/1 (<string>, line 222)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 222)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.name_columns_by_row
   Sheet.rownames
   Sheet.named_column_at
   Sheet.set_named_column_at
   Sheet.delete_named_column_at


Any row as column name

System Message: INFO/1 (<string>, line 235)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 235)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.name_rows_by_column
   Sheet.colnames
   Sheet.named_row_at
   Sheet.set_named_row_at
   Sheet.delete_named_row_at


Conversion

System Message: INFO/1 (<string>, line 248)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 248)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.array
   Sheet.records
   Sheet.dict
   Sheet.url
   Sheet.csv
   Sheet.tsv
   Sheet.csvz
   Sheet.tsvz
   Sheet.xls
   Sheet.xlsm
   Sheet.xlsx
   Sheet.ods
   Sheet.stream


Formatting

System Message: INFO/1 (<string>, line 269)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 269)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.format

Filtering

System Message: INFO/1 (<string>, line 277)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 277)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.filter


Transformation

System Message: INFO/1 (<string>, line 286)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 286)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.project
   Sheet.transpose
   Sheet.map
   Sheet.region
   Sheet.cut
   Sheet.paste

Save changes

System Message: INFO/1 (<string>, line 297); backlink

Duplicate implicit target name: "save changes".

System Message: INFO/1 (<string>, line 299)

No directive entry for "autosummary" in module "docutils.parsers.rst.languages.en". Trying "autosummary" as canonical directive name.

System Message: ERROR/3 (<string>, line 299)

Unknown directive type "autosummary".

.. autosummary::
   :toctree: generated/

   Sheet.save_as
   Sheet.save_to_memory
   Sheet.save_to_database
   Sheet.save_to_django_model

Docutils System Messages

System Message: INFO/1 (<string>, line 7)

Hyperlink target "api" is not referenced.

System Message: INFO/1 (<string>, line 12)

Hyperlink target "signature-functions" is not referenced.

System Message: INFO/1 (<string>, line 17)

Hyperlink target "conversion-from" is not referenced.

System Message: INFO/1 (<string>, line 37)

Hyperlink target "conversion-to" is not referenced.