Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/pandas/io/__pycache__/xml.cpython-37.pyc
Назад
B �5�gr � @ sB d Z ddlmZ ddlZddlmZmZmZmZ ddl m Z ddlmZm Z ddlmZ ddlmZ dd lmZ dd lmZ ddlmZmZmZmZmZ ddlmZ G d d� d�ZG dd� de�ZG dd� de�Z dd�dd�Z!dd�dd�Z"dd�dd�Z#dd�dd�Z$eed d �d1d&d'd(d)d)d*d'd'd+d,d-dd.�d/d0��Z%dS )2z3 :mod:`pandas.io.xml` is a module for reading XML. � )�annotationsN)�Buffer�CompressionOptions�FilePathOrBuffer�StorageOptions)�import_optional_dependency)�AbstractMethodError�ParserError)�doc)�is_list_like)� DataFrame)�_shared_docs)�file_exists� get_handle� is_fsspec_url�is_url�stringify_path)� TextParserc @ sd e Zd ZdZdd�dd�Zdd�dd�Zdd�d d �Zdd�dd�Zdd�d d�Zdd�dd�Z dS )�_XMLFrameParserav Internal subclass to parse XML into DataFrames. Parameters ---------- path_or_buffer : a valid JSON str, path object or file-like object Any valid string path is acceptable. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. xpath : str or regex The XPath expression to parse required set of nodes for migration to `Data Frame`. `etree` supports limited XPath. namespacess : dict The namespaces defined in XML document (`xmlns:namespace='URI') as dicts with key being namespace and value the URI. elems_only : bool Parse only the child elements at the specified `xpath`. attrs_only : bool Parse only the attributes at the specified `xpath`. names : list Column names for Data Frame of parsed XML data. encoding : str Encoding of xml object or document. stylesheet : str or file-like URL, file, file-like object, or a raw string containing XSLT, `etree` does not support XSLT but retained for consistency. compression : {'infer', 'gzip', 'bz2', 'zip', 'xz', None}, default 'infer' Compression type for on-the-fly decompression of on-disk data. If 'infer', then use extension for gzip, bz2, zip or xz. storage_options : dict, optional Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc., See also -------- pandas.io.xml._EtreeFrameParser pandas.io.xml._LxmlFrameParser Notes ----- To subclass this class effectively you must override the following methods:` * :func:`parse_data` * :func:`_parse_nodes` * :func:`_parse_doc` * :func:`_validate_names` * :func:`_validate_path` See each method's respective documentation for details on their functionality. �None)�returnc C sF || _ || _|| _|| _|| _|| _|| _|| _d | _| | _ | | _ d S )N)�path_or_buffer�xpath� namespaces� elems_only� attrs_only�names�encoding� stylesheetZis_style�compression�storage_options)�selfr r r r r r r r r r � r"