pandas 1.4.2

ParametersRaisesReturns
inspect_excel_format(content_or_path: 'FilePath | ReadBuffer[bytes]', storage_options: 'StorageOptions' = None) -> 'str | None'

Adopted from xlrd: https://github.com/python-excel/xlrd.

Parameters

content_or_path : str or file-like object

Path to file or content of file to inspect. May be a URL.

storage_options : dict, optional

Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to urllib as header options. For other URLs (e.g. starting with "s3://", and "gcs://") the key-value pairs are forwarded to fsspec . Please see fsspec and urllib for more details.

Raises

ValueError

If resulting stream is empty.

BadZipFile

If resulting stream does not have an XLS signature and is not a valid zipfile.

Returns

str or None

Format of file if it can be determined.

Inspect the path or content of an excel file and get its format.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/io/excel/_base.py#1219
type: <class 'function'>
Commit: