id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,500 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/excel/_openpyxl.py | pandas.io.excel._openpyxl.OpenpyxlReader | from pandas.core.shared_docs import _shared_docs
from pandas.compat._optional import import_optional_dependency
import numpy as np
from pandas.util._decorators import doc
from pandas.io.excel._base import BaseExcelReader, ExcelWriter
class OpenpyxlReader(BaseExcelReader['Workbook']):
@doc(storage_options=_shared_... |
class OpenpyxlReader(BaseExcelReader['Workbook']):
@doc(storage_options=_shared_docs['storage_options'])
def __init__(self, filepath_or_buffer: FilePath | ReadBuffer[bytes], storage_options: StorageOptions | None=None, engine_kwargs: dict | None=None) -> None:
'''
Reader using openpyxl engine.... | 12 | 1 | 12 | 1 | 9 | 2 | 2 | 0.18 | 1 | 10 | 0 | 0 | 8 | 0 | 8 | 21 | 107 | 17 | 77 | 35 | 50 | 14 | 50 | 20 | 38 | 8 | 2 | 2 | 19 |
7,501 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/excel/_openpyxl.py | pandas.io.excel._openpyxl.OpenpyxlWriter | from typing import TYPE_CHECKING, Any, cast
from pandas.io.excel._util import combine_kwargs, validate_freeze_panes
import mmap
from pandas.io.excel._base import BaseExcelReader, ExcelWriter
class OpenpyxlWriter(ExcelWriter):
_engine = 'openpyxl'
_supported_extensions = ('.xlsx', '.xlsm')
def __init__(sel... |
class OpenpyxlWriter(ExcelWriter):
def __init__(self, path: FilePath | WriteExcelBuffer | ExcelWriter, engine: str | None=None, date_format: str | None=None, datetime_format: str | None=None, mode: str='w', storage_options: StorageOptions | None=None, if_sheet_exists: ExcelWriterIfSheetExists | None=None, engine_... | 28 | 13 | 31 | 4 | 15 | 13 | 4 | 0.79 | 1 | 12 | 0 | 0 | 5 | 1 | 15 | 33 | 491 | 68 | 237 | 99 | 179 | 188 | 160 | 66 | 135 | 19 | 2 | 6 | 55 |
7,502 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/excel/_pyxlsb.py | pandas.io.excel._pyxlsb.PyxlsbReader | from pandas.util._decorators import doc
from pandas.io.excel._base import BaseExcelReader
from pandas.compat._optional import import_optional_dependency
from pandas.core.shared_docs import _shared_docs
class PyxlsbReader(BaseExcelReader['Workbook']):
@doc(storage_options=_shared_docs['storage_options'])
def _... |
class PyxlsbReader(BaseExcelReader['Workbook']):
@doc(storage_options=_shared_docs['storage_options'])
def __init__(self, filepath_or_buffer: FilePath | ReadBuffer[bytes], storage_options: StorageOptions | None=None, engine_kwargs: dict | None=None) -> None:
'''
Reader using pyxlsb engine.
... | 12 | 1 | 12 | 1 | 8 | 3 | 2 | 0.35 | 1 | 9 | 0 | 0 | 8 | 0 | 8 | 21 | 104 | 12 | 69 | 33 | 44 | 24 | 47 | 19 | 36 | 7 | 2 | 2 | 17 |
7,503 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/excel/_xlrd.py | pandas.io.excel._xlrd.XlrdReader | from datetime import time
import math
from pandas.util._decorators import doc
from pandas.io.excel._base import BaseExcelReader
from pandas.core.shared_docs import _shared_docs
from pandas.compat._optional import import_optional_dependency
import numpy as np
class XlrdReader(BaseExcelReader['Book']):
@doc(storage... |
class XlrdReader(BaseExcelReader['Book']):
@doc(storage_options=_shared_docs['storage_options'])
def __init__(self, filepath_or_buffer, storage_options: StorageOptions | None=None, engine_kwargs: dict | None=None) -> None:
'''
Reader using xlrd engine.
Parameters
----------
... | 12 | 2 | 18 | 1 | 13 | 4 | 2 | 0.24 | 1 | 10 | 0 | 0 | 7 | 0 | 7 | 20 | 116 | 14 | 82 | 34 | 54 | 20 | 45 | 18 | 33 | 9 | 2 | 3 | 18 |
7,504 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/excel/_xlsxwriter.py | pandas.io.excel._xlsxwriter.XlsxWriter | import json
from pandas.io.excel._util import combine_kwargs, validate_freeze_panes
from pandas.io.excel._base import ExcelWriter
from typing import TYPE_CHECKING, Any
class XlsxWriter(ExcelWriter):
_engine = 'xlsxwriter'
_supported_extensions = ('.xlsx',)
def __init__(self, path: FilePath | WriteExcelBuf... |
class XlsxWriter(ExcelWriter):
def __init__(self, path: FilePath | WriteExcelBuffer | ExcelWriter, engine: str | None=None, date_format: str | None=None, datetime_format: str | None=None, mode: str='w', storage_options: StorageOptions | None=None, if_sheet_exists: ExcelWriterIfSheetExists | None=None, engine_kwar... | 8 | 2 | 19 | 2 | 15 | 2 | 3 | 0.13 | 1 | 10 | 1 | 0 | 5 | 1 | 5 | 23 | 105 | 17 | 79 | 37 | 52 | 10 | 41 | 17 | 34 | 7 | 2 | 2 | 13 |
7,505 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/excel/_xlsxwriter.py | pandas.io.excel._xlsxwriter._XlsxStyler | from typing import TYPE_CHECKING, Any
class _XlsxStyler:
STYLE_MAPPING: dict[str, list[tuple[tuple[str, ...], str]]] = {'font': [(('name',), 'font_name'), (('sz',), 'font_size'), (('size',), 'font_size'), (('color', 'rgb'), 'font_color'), (('color',), 'font_color'), (('b',), 'bold'), (('bold',), 'bold'), (('i',), ... |
class _XlsxStyler:
@classmethod
def convert(cls, style_dict, num_format_str=None) -> dict[str, Any]:
'''
converts a style_dict to an xlsxwriter format dict
Parameters
----------
style_dict : style dictionary to convert
num_format_str : optional number format str... | 3 | 1 | 82 | 11 | 59 | 12 | 17 | 0.12 | 0 | 6 | 0 | 0 | 0 | 0 | 1 | 1 | 154 | 12 | 127 | 9 | 124 | 15 | 38 | 8 | 36 | 17 | 0 | 4 | 17 |
7,506 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/css.py | pandas.io.formats.css.CSSResolver | from pandas.errors import CSSWarning
import re
from pandas.util._exceptions import find_stack_level
import warnings
class CSSResolver:
"""
A callable for parsing and resolving CSS to atomic properties.
"""
UNIT_RATIOS = {'pt': ('pt', 1), 'em': ('em', 1), 'rem': ('pt', 12), 'ex': ('em', 0.5), 'px': ('pt... |
class CSSResolver:
'''
A callable for parsing and resolving CSS to atomic properties.
'''
def __call__(self, declarations: str | Iterable[tuple[str, str]], inherited: dict[str, str] | None=None) -> dict[str, str]:
'''
The given declarations to atomic properties.
Parameters
... | 11 | 3 | 21 | 1 | 14 | 5 | 4 | 0.27 | 0 | 11 | 0 | 0 | 9 | 0 | 9 | 9 | 300 | 31 | 211 | 48 | 186 | 58 | 104 | 34 | 93 | 9 | 0 | 3 | 36 |
7,507 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/csvs.py | pandas.io.formats.csvs.CSVFormatter | from collections.abc import Hashable, Iterable, Iterator, Sequence
from typing import TYPE_CHECKING, Any, cast
from pandas.io.common import get_handle
from pandas._typing import SequenceNotStr
import os
from pandas.core.indexes.api import Index
import csv as csvlib
from pandas.core.dtypes.generic import ABCDatetimeInde... |
class CSVFormatter:
def __init__(self, formatter: DataFrameFormatter, path_or_buf: FilePath | WriteBuffer[str] | WriteBuffer[bytes]='', sep: str=',', cols: Sequence[Hashable] | None=None, index_label: IndexLabel | None=None, mode: str='w', encoding: str | None=None, errors: str='strict', compression: CompressionO... | 41 | 2 | 9 | 1 | 8 | 1 | 2 | 0.09 | 0 | 20 | 0 | 0 | 27 | 18 | 27 | 27 | 279 | 41 | 219 | 100 | 157 | 19 | 140 | 65 | 112 | 5 | 0 | 3 | 56 |
7,508 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/excel.py | pandas.io.formats.excel.CSSToExcelConverter | from pandas.io.formats._color_data import CSS4_COLORS
import warnings
from pandas.util._exceptions import find_stack_level
import re
from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence
import functools
from pandas.io.formats.css import CSSResolver, CSSWarning
class CSSToExcelConverter:
"""
... |
class CSSToExcelConverter:
'''
A callable for converting CSS declarations to ExcelWriter styles
Supports parts of CSS 2.2, with minimal CSS 3.0 support (e.g. text-shadow),
focusing on font styling, backgrounds, borders and alignment.
Operates by first computing CSS styles in a fairly generic
wa... | 28 | 4 | 10 | 1 | 8 | 2 | 3 | 0.25 | 0 | 13 | 0 | 0 | 27 | 1 | 27 | 27 | 393 | 53 | 278 | 68 | 239 | 70 | 163 | 58 | 134 | 12 | 0 | 3 | 72 |
7,509 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/excel.py | pandas.io.formats.excel.CssExcelCell | from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence
from typing import TYPE_CHECKING, Any, cast
class CssExcelCell(ExcelCell):
def __init__(self, row: int, col: int, val, style: dict | None, css_styles: dict[tuple[int, int], list[tuple[str, Any]]] | None, css_row: int, css_col: int, css_co... |
class CssExcelCell(ExcelCell):
def __init__(self, row: int, col: int, val, style: dict | None, css_styles: dict[tuple[int, int], list[tuple[str, Any]]] | None, css_row: int, css_col: int, css_converter: Callable | None, **kwargs) -> None:
pass | 2 | 0 | 22 | 1 | 19 | 2 | 2 | 0.1 | 1 | 9 | 0 | 0 | 1 | 0 | 1 | 2 | 23 | 1 | 20 | 15 | 7 | 2 | 7 | 4 | 5 | 2 | 1 | 1 | 2 |
7,510 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/excel.py | pandas.io.formats.excel.ExcelCell | class ExcelCell:
__fields__ = ('row', 'col', 'val', 'style', 'mergestart', 'mergeend')
__slots__ = __fields__
def __init__(self, row: int, col: int, val, style=None, mergestart: int | None=None, mergeend: int | None=None) -> None:
self.row = row
self.col = col
self.val = val
... | class ExcelCell:
def __init__(self, row: int, col: int, val, style=None, mergestart: int | None=None, mergeend: int | None=None) -> None:
pass | 2 | 0 | 15 | 0 | 15 | 0 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 6 | 1 | 1 | 19 | 1 | 18 | 18 | 8 | 0 | 10 | 10 | 8 | 1 | 0 | 0 | 1 |
7,511 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/excel.py | pandas.io.formats.excel.ExcelFormatter | import itertools
from pandas._libs.lib import is_list_like
from pandas.core.dtypes import missing
from pandas.core.shared_docs import _shared_docs
import numpy as np
import functools
from pandas.util._decorators import doc
from pandas.core.dtypes.common import is_float, is_scalar
from pandas.io.formats.format import ge... |
class ExcelFormatter:
'''
Class for formatting a DataFrame to a list of ExcelCells,
Parameters
----------
df : DataFrame or Styler
na_rep: na representation
float_format : str, default None
Format string for floating point numbers
cols : sequence, optional
Columns to wri... | 15 | 3 | 33 | 3 | 26 | 3 | 6 | 0.23 | 0 | 24 | 3 | 0 | 12 | 12 | 12 | 12 | 442 | 51 | 319 | 90 | 281 | 73 | 177 | 66 | 163 | 15 | 0 | 5 | 72 |
7,512 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format.DataFrameFormatter | from typing import TYPE_CHECKING, Any, Final, cast
from pandas.core.dtypes.common import is_complex_dtype, is_float, is_integer, is_list_like, is_numeric_dtype, is_scalar
from pandas.io.formats import printing
from collections.abc import Callable, Generator, Hashable, Mapping, Sequence
from shutil import get_terminal_s... |
class DataFrameFormatter:
'''
Class for processing dataframe formatting options and data.
Used by DataFrame.to_string, which backs DataFrame.__repr__.
'''
def __init__(self, frame: DataFrame, columns: Axes | None=None, col_space: ColspaceArgType | None=None, header: bool | SequenceNotStr[str]=True... | 45 | 11 | 12 | 1 | 10 | 1 | 2 | 0.11 | 0 | 14 | 0 | 0 | 33 | 24 | 33 | 33 | 433 | 67 | 329 | 128 | 262 | 37 | 224 | 96 | 189 | 8 | 0 | 3 | 78 |
7,513 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format.DataFrameRenderer | from collections.abc import Callable, Generator, Hashable, Mapping, Sequence
from io import StringIO
class DataFrameRenderer:
"""Class for creating dataframe output in multiple formats.
Called in pandas.core.generic.NDFrame:
- to_csv
- to_latex
Called in pandas.DataFrame:
- to_htm... |
class DataFrameRenderer:
'''Class for creating dataframe output in multiple formats.
Called in pandas.core.generic.NDFrame:
- to_csv
- to_latex
Called in pandas.DataFrame:
- to_html
- to_string
Parameters
----------
fmt : DataFrameFormatter
Formatter with... | 5 | 4 | 35 | 2 | 22 | 11 | 2 | 0.63 | 0 | 14 | 1 | 0 | 4 | 1 | 4 | 4 | 159 | 16 | 88 | 52 | 45 | 55 | 28 | 17 | 20 | 3 | 0 | 1 | 7 |
7,514 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format.EngFormatter | import math
from decimal import Decimal
class EngFormatter:
"""
Formats float values according to engineering format.
Based on matplotlib.ticker.EngFormatter
"""
ENG_PREFIXES = {-24: 'y', -21: 'z', -18: 'a', -15: 'f', -12: 'p', -9: 'n', -6: 'u', -3: 'm', 0: '', 3: 'k', 6: 'M', 9: 'G', 12: 'T', 15:... |
class EngFormatter:
'''
Formats float values according to engineering format.
Based on matplotlib.ticker.EngFormatter
'''
def __init__(self, accuracy: int | None=None, use_eng_prefix: bool=False) -> None:
pass
def __call__(self, num: float) -> str:
'''
Formats a number... | 3 | 2 | 33 | 7 | 18 | 10 | 5 | 0.44 | 0 | 5 | 0 | 0 | 2 | 2 | 2 | 2 | 94 | 17 | 55 | 16 | 50 | 24 | 31 | 14 | 28 | 8 | 0 | 1 | 9 |
7,515 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format.FloatArrayFormatter | from pandas.core.dtypes.common import is_complex_dtype, is_float, is_integer, is_list_like, is_numeric_dtype, is_scalar
from pandas._config.config import get_option, set_option
from pandas.core.dtypes.missing import isna, notna
from functools import partial
from collections.abc import Callable, Generator, Hashable, Map... |
class FloatArrayFormatter(_GenericArrayFormatter):
def __init__(self, *args, **kwargs) -> None:
pass
def _value_formatter(self, float_format: FloatFormatType | None=None, threshold: float | None=None) -> Callable:
'''Returns a function to be applied on each value to format it'''
pass
... | 13 | 2 | 26 | 3 | 19 | 5 | 4 | 0.29 | 1 | 7 | 0 | 0 | 4 | 3 | 4 | 7 | 201 | 33 | 136 | 44 | 116 | 39 | 97 | 36 | 85 | 10 | 1 | 3 | 40 |
7,516 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format.SeriesFormatter | from io import StringIO
from pandas.core.indexes.datetimes import DatetimeIndex
from pandas.io.formats import printing
from typing import TYPE_CHECKING, Any, Final, cast
from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype
from pandas.core.indexes.timedeltas import TimedeltaIndex
from... |
class SeriesFormatter:
'''
Implement the main logic of Series.to_string, which underlies
Series.__repr__.
'''
def __init__(self, series: Series, *, length: bool | str=True, header: bool=True, index: bool=True, na_rep: str='NaN', name: bool=False, float_format: str | None=None, dtype: bool=True, ma... | 6 | 1 | 31 | 3 | 26 | 2 | 5 | 0.09 | 0 | 11 | 0 | 0 | 5 | 15 | 5 | 5 | 164 | 22 | 130 | 59 | 111 | 12 | 99 | 46 | 93 | 11 | 0 | 3 | 26 |
7,517 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format._Datetime64Formatter | from pandas.core.arrays import Categorical, DatetimeArray, ExtensionArray, TimedeltaArray
class _Datetime64Formatter(_GenericArrayFormatter):
values: DatetimeArray
def __init__(self, values: DatetimeArray, nat_rep: str='NaT', date_format: None=None, **kwargs) -> None:
super().__init__(values, **kwargs... |
class _Datetime64Formatter(_GenericArrayFormatter):
def __init__(self, values: DatetimeArray, nat_rep: str='NaT', date_format: None=None, **kwargs) -> None:
pass
def _format_strings(self) -> list[str]:
'''we by definition have DO NOT have a TZ'''
pass | 3 | 1 | 11 | 1 | 9 | 1 | 2 | 0.05 | 1 | 4 | 0 | 1 | 2 | 2 | 2 | 5 | 25 | 4 | 20 | 13 | 11 | 1 | 12 | 7 | 9 | 2 | 1 | 1 | 3 |
7,518 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format._Datetime64TZFormatter | from pandas.core.arrays import Categorical, DatetimeArray, ExtensionArray, TimedeltaArray
class _Datetime64TZFormatter(_Datetime64Formatter):
values: DatetimeArray
def _format_strings(self) -> list[str]:
"""we by definition have a TZ"""
ido = self.values._is_dates_only
values = self.va... |
class _Datetime64TZFormatter(_Datetime64Formatter):
def _format_strings(self) -> list[str]:
'''we by definition have a TZ'''
pass | 2 | 1 | 10 | 1 | 8 | 1 | 1 | 0.1 | 1 | 3 | 0 | 0 | 1 | 0 | 1 | 6 | 13 | 2 | 10 | 6 | 8 | 1 | 8 | 6 | 6 | 1 | 2 | 0 | 1 |
7,519 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format._ExtensionArrayFormatter | from pandas.core.arrays import Categorical, DatetimeArray, ExtensionArray, TimedeltaArray
import numpy as np
class _ExtensionArrayFormatter(_GenericArrayFormatter):
values: ExtensionArray
def _format_strings(self) -> list[str]:
values = self.values
formatter = self.formatter
fallback_f... |
class _ExtensionArrayFormatter(_GenericArrayFormatter):
def _format_strings(self) -> list[str]:
pass | 2 | 0 | 28 | 3 | 24 | 1 | 3 | 0.04 | 1 | 3 | 0 | 0 | 1 | 8 | 1 | 4 | 31 | 4 | 26 | 15 | 24 | 1 | 13 | 7 | 11 | 3 | 1 | 1 | 3 |
7,520 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format._GenericArrayFormatter | from pandas._libs.tslibs import NaT, Timedelta, Timestamp
from pandas.core.base import PandasObject
from pandas._libs.missing import NA
from functools import partial
from pandas._libs import lib
from collections.abc import Callable, Generator, Hashable, Mapping, Sequence
from pandas.core.dtypes.common import is_complex... |
class _GenericArrayFormatter:
def __init__(self, values: ArrayLike, digits: int=7, formatter: Callable | None=None, na_rep: str='NaN', space: str | int=12, float_format: FloatFormatType | None=None, justify: str='right', decimal: str='.', quoting: int | None=None, fixed_width: bool=True, leading_space: bool | Non... | 6 | 0 | 29 | 1 | 27 | 1 | 5 | 0.04 | 0 | 12 | 0 | 5 | 3 | 12 | 3 | 3 | 104 | 7 | 93 | 43 | 74 | 4 | 57 | 29 | 52 | 11 | 0 | 3 | 20 |
7,521 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format._IntArrayFormatter | class _IntArrayFormatter(_GenericArrayFormatter):
def _format_strings(self) -> list[str]:
if self.leading_space is False:
def formatter_str(x):
return f'{x:d}'.format(x=x)
else:
def formatter_str(x):
return f'{x: d}'.format(x=x)
form... | class _IntArrayFormatter(_GenericArrayFormatter):
def _format_strings(self) -> list[str]:
pass
def formatter_str(x):
pass
def formatter_str(x):
pass | 4 | 0 | 8 | 0 | 8 | 0 | 2 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 4 | 9 | 0 | 9 | 5 | 7 | 0 | 8 | 5 | 6 | 2 | 1 | 1 | 2 |
7,522 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/format.py | pandas.io.formats.format._Timedelta64Formatter | from pandas.core.arrays import Categorical, DatetimeArray, ExtensionArray, TimedeltaArray
class _Timedelta64Formatter(_GenericArrayFormatter):
values: TimedeltaArray
def __init__(self, values: TimedeltaArray, nat_rep: str='NaT', **kwargs) -> None:
super().__init__(values, **kwargs)
self.nat_re... |
class _Timedelta64Formatter(_GenericArrayFormatter):
def __init__(self, values: TimedeltaArray, nat_rep: str='NaT', **kwargs) -> None:
pass
def _format_strings(self) -> list[str]:
pass | 3 | 0 | 7 | 0 | 7 | 1 | 1 | 0.07 | 1 | 4 | 0 | 0 | 2 | 1 | 2 | 5 | 18 | 2 | 15 | 10 | 7 | 1 | 8 | 5 | 5 | 1 | 1 | 0 | 2 |
7,523 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/html.py | pandas.io.formats.html.HTMLFormatter | from pandas.io.common import is_url
from pandas._config import get_option
from pandas import MultiIndex, option_context
from typing import TYPE_CHECKING, Any, Final, cast
from pandas._libs import lib
from pandas.io.formats.printing import pprint_thing
from pandas.io.formats.format import DataFrameFormatter, get_level_l... |
class HTMLFormatter:
'''
Internal class for formatting output data in html.
This class is intended for shared functionality between
DataFrame.to_html() and DataFrame._repr_html_().
Any logic in common with other output formatting methods
should ideally be inherited from classes in format.py
... | 30 | 2 | 23 | 2 | 17 | 3 | 4 | 0.2 | 0 | 17 | 0 | 1 | 23 | 12 | 23 | 23 | 562 | 74 | 407 | 137 | 353 | 83 | 301 | 107 | 277 | 22 | 0 | 7 | 100 |
7,524 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/html.py | pandas.io.formats.html.NotebookFormatter | from textwrap import dedent
from pandas import MultiIndex, option_context
class NotebookFormatter(HTMLFormatter):
"""
Internal class for formatting output data in html for display in Jupyter
Notebooks. This class is intended for functionality specific to
DataFrame._repr_html_() and DataFrame.to_html(no... |
class NotebookFormatter(HTMLFormatter):
'''
Internal class for formatting output data in html for display in Jupyter
Notebooks. This class is intended for functionality specific to
DataFrame._repr_html_() and DataFrame.to_html(notebook=True)
'''
def _get_formatted_values(self) -> dict[int, lis... | 5 | 1 | 10 | 0 | 9 | 1 | 2 | 0.26 | 1 | 6 | 0 | 0 | 4 | 0 | 4 | 27 | 48 | 4 | 35 | 11 | 30 | 9 | 24 | 11 | 19 | 3 | 1 | 2 | 6 |
7,525 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info.DataFrameInfo | class DataFrameInfo(_BaseInfo):
"""
Class storing dataframe-specific info.
"""
def __init__(self, data: DataFrame, memory_usage: bool | str | None=None) -> None:
self.data: DataFrame = data
self.memory_usage = _initialize_memory_usage(memory_usage)
@property
def dtype_counts(se... | class DataFrameInfo(_BaseInfo):
'''
Class storing dataframe-specific info.
'''
def __init__(self, data: DataFrame, memory_usage: bool | str | None=None) -> None:
pass
@property
def dtype_counts(self) -> Mapping[str, int]:
pass
@property
def dtypes(self) -> Iterable[Dtype... | 15 | 5 | 7 | 0 | 4 | 2 | 1 | 0.45 | 1 | 8 | 1 | 0 | 8 | 2 | 8 | 35 | 71 | 10 | 42 | 30 | 16 | 19 | 20 | 13 | 11 | 1 | 5 | 0 | 8 |
7,526 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info.SeriesInfo | class SeriesInfo(_BaseInfo):
"""
Class storing series-specific info.
"""
def __init__(self, data: Series, memory_usage: bool | str | None=None) -> None:
self.data: Series = data
self.memory_usage = _initialize_memory_usage(memory_usage)
def render(self, *, buf: WriteBuffer[str] | N... | class SeriesInfo(_BaseInfo):
'''
Class storing series-specific info.
'''
def __init__(self, data: Series, memory_usage: bool | str | None=None) -> None:
pass
def render(self, *, buf: WriteBuffer[str] | None=None, max_cols: int | None=None, verbose: bool | None=None, show_counts: bool | Non... | 11 | 2 | 7 | 0 | 6 | 1 | 1 | 0.22 | 1 | 11 | 1 | 0 | 6 | 2 | 6 | 33 | 58 | 8 | 41 | 27 | 18 | 9 | 19 | 12 | 11 | 2 | 5 | 1 | 7 |
7,527 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._BaseInfo | from abc import ABC, abstractmethod
class _BaseInfo(ABC):
"""
Base class for DataFrameInfo and SeriesInfo.
Parameters
----------
data : DataFrame or Series
Either dataframe or series.
memory_usage : bool or str, optional
If "deep", introspect the data deeply by interrogating ob... |
class _BaseInfo(ABC):
'''
Base class for DataFrameInfo and SeriesInfo.
Parameters
----------
data : DataFrame or Series
Either dataframe or series.
memory_usage : bool or str, optional
If "deep", introspect the data deeply by interrogating object dtypes
for system-level ... | 19 | 6 | 7 | 0 | 4 | 3 | 1 | 0.79 | 1 | 8 | 0 | 2 | 7 | 0 | 7 | 27 | 81 | 11 | 39 | 23 | 13 | 31 | 18 | 9 | 10 | 4 | 4 | 3 | 10 |
7,528 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._DataFrameInfoPrinter | from pandas._config import get_option
class _DataFrameInfoPrinter(_InfoPrinterAbstract):
"""
Class for printing dataframe info.
Parameters
----------
info : DataFrameInfo
Instance of DataFrameInfo.
max_cols : int, optional
When to switch from the verbose to the truncated output... |
class _DataFrameInfoPrinter(_InfoPrinterAbstract):
'''
Class for printing dataframe info.
Parameters
----------
info : DataFrameInfo
Instance of DataFrameInfo.
max_cols : int, optional
When to switch from the verbose to the truncated output.
verbose : bool, optional
... | 13 | 6 | 6 | 0 | 6 | 1 | 2 | 0.43 | 1 | 6 | 4 | 0 | 8 | 5 | 8 | 10 | 78 | 9 | 49 | 24 | 30 | 21 | 29 | 14 | 20 | 4 | 1 | 1 | 13 |
7,529 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._DataFrameTableBuilder | from abc import ABC, abstractmethod
class _DataFrameTableBuilder(_TableBuilderAbstract):
"""
Abstract builder for dataframe info table.
Parameters
----------
info : DataFrameInfo.
Instance of DataFrameInfo.
"""
def __init__(self, *, info: DataFrameInfo) -> None:
self.info:... |
class _DataFrameTableBuilder(_TableBuilderAbstract):
'''
Abstract builder for dataframe info table.
Parameters
----------
info : DataFrameInfo.
Instance of DataFrameInfo.
'''
def __init__(self, *, info: DataFrameInfo) -> None:
pass
def get_lines(self) -> list[str]:
... | 13 | 7 | 4 | 0 | 3 | 1 | 1 | 0.48 | 1 | 4 | 1 | 2 | 8 | 2 | 8 | 38 | 49 | 9 | 27 | 15 | 14 | 13 | 22 | 11 | 13 | 2 | 5 | 1 | 9 |
7,530 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._DataFrameTableBuilderNonVerbose | class _DataFrameTableBuilderNonVerbose(_DataFrameTableBuilder):
"""
Dataframe info table builder for non-verbose output.
"""
def _fill_non_empty_info(self) -> None:
"""Add lines to the info table, pertaining to non-empty dataframe."""
self.add_object_type_line()
self.add_index_r... | class _DataFrameTableBuilderNonVerbose(_DataFrameTableBuilder):
'''
Dataframe info table builder for non-verbose output.
'''
def _fill_non_empty_info(self) -> None:
'''Add lines to the info table, pertaining to non-empty dataframe.'''
pass
def add_columns_summary_line(self) -> None... | 3 | 2 | 5 | 0 | 5 | 1 | 2 | 0.4 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 40 | 16 | 2 | 10 | 3 | 7 | 4 | 10 | 3 | 7 | 2 | 6 | 1 | 3 |
7,531 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._DataFrameTableBuilderVerbose | from pandas.io.formats.printing import pprint_thing
class _DataFrameTableBuilderVerbose(_DataFrameTableBuilder, _TableBuilderVerboseMixin):
"""
Dataframe info table builder for verbose output.
"""
def __init__(self, *, info: DataFrameInfo, with_counts: bool) -> None:
self.info = info
s... |
class _DataFrameTableBuilderVerbose(_DataFrameTableBuilder, _TableBuilderVerboseMixin):
'''
Dataframe info table builder for verbose output.
'''
def __init__(self, *, info: DataFrameInfo, with_counts: bool) -> None:
pass
def _fill_non_empty_info(self) -> None:
'''Add lines to the ... | 10 | 7 | 6 | 0 | 6 | 1 | 2 | 0.23 | 2 | 9 | 1 | 0 | 8 | 4 | 8 | 58 | 64 | 8 | 47 | 21 | 32 | 11 | 32 | 15 | 23 | 2 | 6 | 1 | 12 |
7,532 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._InfoPrinterAbstract | from abc import ABC, abstractmethod
from pandas.io.formats import format as fmt
import sys
class _InfoPrinterAbstract:
"""
Class for printing dataframe or series info.
"""
def to_buffer(self, buf: WriteBuffer[str] | None=None) -> None:
"""Save dataframe info into buffer."""
table_build... |
class _InfoPrinterAbstract:
'''
Class for printing dataframe or series info.
'''
def to_buffer(self, buf: WriteBuffer[str] | None=None) -> None:
'''Save dataframe info into buffer.'''
pass
@abstractmethod
def _create_table_builder(self) -> _TableBuilderAbstract:
'''Crea... | 4 | 3 | 5 | 0 | 4 | 2 | 2 | 0.67 | 0 | 3 | 1 | 2 | 2 | 0 | 2 | 2 | 16 | 2 | 9 | 6 | 5 | 6 | 8 | 5 | 5 | 2 | 0 | 1 | 3 |
7,533 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._SeriesInfoPrinter | class _SeriesInfoPrinter(_InfoPrinterAbstract):
"""Class for printing series info.
Parameters
----------
info : SeriesInfo
Instance of SeriesInfo.
verbose : bool, optional
Whether to print the full summary.
show_counts : bool, optional
Whether to show the non-null counts... | class _SeriesInfoPrinter(_InfoPrinterAbstract):
'''Class for printing series info.
Parameters
----------
info : SeriesInfo
Instance of SeriesInfo.
verbose : bool, optional
Whether to print the full summary.
show_counts : bool, optional
Whether to show the non-null counts.... | 4 | 2 | 9 | 0 | 8 | 1 | 2 | 0.54 | 1 | 5 | 4 | 0 | 3 | 4 | 3 | 5 | 41 | 4 | 24 | 13 | 15 | 13 | 14 | 8 | 10 | 2 | 1 | 1 | 5 |
7,534 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._SeriesTableBuilder | from abc import ABC, abstractmethod
class _SeriesTableBuilder(_TableBuilderAbstract):
"""
Abstract builder for series info table.
Parameters
----------
info : SeriesInfo.
Instance of SeriesInfo.
"""
def __init__(self, *, info: SeriesInfo) -> None:
self.info: SeriesInfo = i... |
class _SeriesTableBuilder(_TableBuilderAbstract):
'''
Abstract builder for series info table.
Parameters
----------
info : SeriesInfo.
Instance of SeriesInfo.
'''
def __init__(self, *, info: SeriesInfo) -> None:
pass
def get_lines(self) -> list[str]:
pass
@... | 8 | 4 | 3 | 0 | 2 | 1 | 1 | 0.71 | 1 | 4 | 1 | 2 | 5 | 2 | 5 | 35 | 30 | 6 | 14 | 10 | 6 | 10 | 12 | 8 | 6 | 1 | 5 | 0 | 5 |
7,535 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._SeriesTableBuilderNonVerbose | class _SeriesTableBuilderNonVerbose(_SeriesTableBuilder):
"""
Series info table builder for non-verbose output.
"""
def _fill_non_empty_info(self) -> None:
"""Add lines to the info table, pertaining to non-empty series."""
self.add_object_type_line()
self.add_index_range_line()
... | class _SeriesTableBuilderNonVerbose(_SeriesTableBuilder):
'''
Series info table builder for non-verbose output.
'''
def _fill_non_empty_info(self) -> None:
'''Add lines to the info table, pertaining to non-empty series.'''
pass | 2 | 2 | 7 | 0 | 6 | 1 | 2 | 0.57 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 36 | 12 | 1 | 7 | 2 | 5 | 4 | 7 | 2 | 5 | 2 | 6 | 1 | 2 |
7,536 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._SeriesTableBuilderVerbose | class _SeriesTableBuilderVerbose(_SeriesTableBuilder, _TableBuilderVerboseMixin):
"""
Series info table builder for verbose output.
"""
def __init__(self, *, info: SeriesInfo, with_counts: bool) -> None:
self.info = info
self.with_counts = with_counts
self.strrows: Sequence[Sequ... | class _SeriesTableBuilderVerbose(_SeriesTableBuilder, _TableBuilderVerboseMixin):
'''
Series info table builder for verbose output.
'''
def __init__(self, *, info: SeriesInfo, with_counts: bool) -> None:
pass
def _fill_non_empty_info(self) -> None:
'''Add lines to the info table, p... | 8 | 5 | 6 | 0 | 6 | 1 | 1 | 0.2 | 2 | 8 | 1 | 0 | 6 | 4 | 6 | 53 | 48 | 6 | 35 | 17 | 22 | 7 | 26 | 11 | 19 | 2 | 6 | 1 | 8 |
7,537 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._TableBuilderAbstract | from abc import ABC, abstractmethod
class _TableBuilderAbstract(ABC):
"""
Abstract builder for info table.
"""
_lines: list[str]
info: _BaseInfo
@abstractmethod
def get_lines(self) -> list[str]:
"""Product in a form of list of lines (strings)."""
@property
def data(self) -... |
class _TableBuilderAbstract(ABC):
'''
Abstract builder for info table.
'''
@abstractmethod
def get_lines(self) -> list[str]:
'''Product in a form of list of lines (strings).'''
pass
@property
def data(self) -> DataFrame | Series:
pass
@property
def dtypes(sel... | 18 | 9 | 3 | 0 | 2 | 1 | 1 | 0.34 | 1 | 7 | 0 | 3 | 10 | 0 | 10 | 30 | 54 | 11 | 32 | 19 | 14 | 11 | 23 | 12 | 12 | 1 | 4 | 0 | 10 |
7,538 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/info.py | pandas.io.formats.info._TableBuilderVerboseMixin | from abc import ABC, abstractmethod
from pandas.io.formats.printing import pprint_thing
class _TableBuilderVerboseMixin(_TableBuilderAbstract):
"""
Mixin for verbose info output.
"""
SPACING: str = ' ' * 2
strrows: Sequence[Sequence[str]]
gross_column_widths: Sequence[int]
with_counts: bool... |
class _TableBuilderVerboseMixin(_TableBuilderAbstract):
'''
Mixin for verbose info output.
'''
@property
@abstractmethod
def headers(self) -> Sequence[str]:
'''Headers names of the columns in verbose table.'''
pass
@property
def header_column_widths(self) -> Sequence[int... | 18 | 10 | 5 | 0 | 4 | 1 | 1 | 0.24 | 1 | 6 | 0 | 2 | 12 | 0 | 12 | 42 | 91 | 14 | 62 | 26 | 44 | 15 | 36 | 22 | 23 | 2 | 5 | 1 | 16 |
7,539 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/printing.py | pandas.io.formats.printing.PrettyDict | class PrettyDict(dict[_KT, _VT]):
"""Dict extension to support abbreviated __repr__"""
def __repr__(self) -> str:
return pprint_thing(self) | class PrettyDict(dict[_KT, _VT]):
'''Dict extension to support abbreviated __repr__'''
def __repr__(self) -> str:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 28 | 5 | 1 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 2 | 0 | 1 |
7,540 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/printing.py | pandas.io.formats.printing._EastAsianTextAdjustment | from unicodedata import east_asian_width
from collections.abc import Callable, Iterable, Mapping, Sequence
from pandas._config import get_option
class _EastAsianTextAdjustment(_TextAdjustment):
def __init__(self) -> None:
super().__init__()
if get_option('display.unicode.ambiguous_as_wide'):
... |
class _EastAsianTextAdjustment(_TextAdjustment):
def __init__(self) -> None:
pass
def len(self, text: str) -> int:
'''
Calculate display width considering unicode East Asian Width
'''
pass
def justify(self, texts: Iterable[str], max_len: int, mode: str='right') ->... | 5 | 1 | 9 | 1 | 7 | 2 | 2 | 0.28 | 1 | 5 | 0 | 0 | 3 | 2 | 3 | 7 | 37 | 5 | 25 | 9 | 18 | 7 | 18 | 7 | 13 | 3 | 1 | 1 | 8 |
7,541 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/printing.py | pandas.io.formats.printing._TextAdjustment | from typing import TYPE_CHECKING, Any, TypeAlias, TypeVar
from pandas._config import get_option
class _TextAdjustment:
def __init__(self) -> None:
self.encoding = get_option('display.encoding')
def len(self, text: str) -> int:
return len(text)
def justify(self, texts: Any, max_len: int, ... |
class _TextAdjustment:
def __init__(self) -> None:
pass
def len(self, text: str) -> int:
pass
def justify(self, texts: Any, max_len: int, mode: str='right') -> list[str]:
'''
Perform ljust, center, rjust against string or list-like
'''
pass
def adjoin... | 5 | 1 | 4 | 0 | 3 | 1 | 2 | 0.21 | 0 | 4 | 0 | 1 | 4 | 1 | 4 | 4 | 20 | 3 | 14 | 6 | 9 | 3 | 12 | 6 | 7 | 3 | 0 | 1 | 6 |
7,542 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/string.py | pandas.io.formats.string.StringFormatter | import numpy as np
from pandas.io.formats.printing import pprint_thing
from shutil import get_terminal_size
class StringFormatter:
"""Formatter for string representation of a dataframe."""
def __init__(self, fmt: DataFrameFormatter, line_width: int | None=None) -> None:
self.fmt = fmt
self.adj... |
class StringFormatter:
'''Formatter for string representation of a dataframe.'''
def __init__(self, fmt: DataFrameFormatter, line_width: int | None=None) -> None:
pass
def to_string(self) -> str:
pass
def _get_strcols(self) -> list[list[str]]:
pass
def _get_string_repres... | 16 | 1 | 13 | 2 | 10 | 1 | 3 | 0.07 | 0 | 9 | 0 | 0 | 12 | 4 | 12 | 12 | 168 | 30 | 129 | 62 | 108 | 9 | 110 | 55 | 96 | 7 | 0 | 3 | 32 |
7,543 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/style.py | pandas.io.formats.style.Styler | from pandas.core.shared_docs import _shared_docs
from pandas.util._decorators import Substitution, doc
from typing import TYPE_CHECKING, Concatenate, Self, overload
from pandas.core.frame import DataFrame, Series
from pandas.core.generic import NDFrame
import textwrap
import pandas.core.common as com
from pandas._confi... |
class Styler(StylerRenderer):
'''
Helps style a DataFrame or Series according to the data with HTML and CSS.
This class provides methods for styling and formatting a Pandas DataFrame or Series.
The styled output can be rendered as HTML or LaTeX, and it supports CSS-based
styling, allowing users to ... | 86 | 34 | 64 | 9 | 20 | 36 | 3 | 1.69 | 1 | 29 | 1 | 0 | 53 | 9 | 54 | 72 | 3,838 | 565 | 1,222 | 583 | 730 | 2,069 | 417 | 139 | 359 | 21 | 1 | 3 | 179 |
7,544 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/style_render.py | pandas.io.formats.style_render.CSSDict | from typing import TYPE_CHECKING, Any, DefaultDict, TypeAlias, TypedDict
class CSSDict(TypedDict):
selector: str
props: CSSProperties |
class CSSDict(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
7,545 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/style_render.py | pandas.io.formats.style_render.StylerRenderer | from pandas import DataFrame, Index, IndexSlice, MultiIndex, Series, isna
from collections import defaultdict
from typing import TYPE_CHECKING, Any, DefaultDict, TypeAlias, TypedDict
import pandas.core.common as com
from markupsafe import escape as escape_html
import pathlib
from uuid import uuid4
from pandas._config i... |
class StylerRenderer:
'''
Base class to process rendering a Styler with a specified jinja2 template.
'''
def __init__(self, data: DataFrame | Series, uuid: str | None=None, uuid_len: int=5, table_styles: CSSStyles | None=None, table_attributes: str | None=None, caption: str | tuple | list | None=N... | 24 | 21 | 72 | 8 | 35 | 30 | 5 | 0.85 | 0 | 19 | 1 | 0 | 20 | 31 | 20 | 20 | 1,662 | 209 | 793 | 268 | 667 | 678 | 356 | 166 | 332 | 11 | 0 | 4 | 111 |
7,546 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/style_render.py | pandas.io.formats.style_render.Tooltips | from pandas import DataFrame, Index, IndexSlice, MultiIndex, Series, isna
class Tooltips:
"""
An extension to ``Styler`` that allows for and manipulates tooltips on hover
of ``<td>`` cells in the HTML result.
Parameters
----------
css_name: str, default "pd-t"
Name of the CSS class tha... |
class Tooltips:
'''
An extension to ``Styler`` that allows for and manipulates tooltips on hover
of ``<td>`` cells in the HTML result.
Parameters
----------
css_name: str, default "pd-t"
Name of the CSS class that controls visualisation of tooltips.
css_props: list-like, default; se... | 6 | 4 | 38 | 2 | 22 | 15 | 3 | 0.97 | 0 | 8 | 2 | 0 | 4 | 5 | 4 | 4 | 191 | 17 | 90 | 35 | 69 | 87 | 37 | 18 | 32 | 10 | 0 | 5 | 13 |
7,547 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/xml.py | pandas.io.formats.xml.EtreeXMLFormatter | from pandas.util._decorators import cache_readonly, doc
class EtreeXMLFormatter(_BaseXMLFormatter):
"""
Class for formatting data in xml using Python standard library
modules: `xml.etree.ElementTree` and `xml.dom.minidom`.
"""
def _build_tree(self) -> bytes:
from xml.etree.ElementTree impo... |
class EtreeXMLFormatter(_BaseXMLFormatter):
'''
Class for formatting data in xml using Python standard library
modules: `xml.etree.ElementTree` and `xml.dom.minidom`.
'''
def _build_tree(self) -> bytes:
pass
def _get_prefix_uri(self) -> str:
pass
@cache_readonly
def _s... | 6 | 2 | 19 | 4 | 14 | 1 | 4 | 0.14 | 1 | 6 | 0 | 0 | 4 | 4 | 4 | 17 | 85 | 19 | 58 | 24 | 44 | 8 | 39 | 17 | 30 | 7 | 1 | 3 | 14 |
7,548 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/xml.py | pandas.io.formats.xml.LxmlXMLFormatter | from pandas.util._decorators import cache_readonly, doc
import io
from pandas.io.xml import get_data_from_filepath
class LxmlXMLFormatter(_BaseXMLFormatter):
"""
Class for formatting data in xml using Python standard library
modules: `xml.etree.ElementTree` and `xml.dom.minidom`.
"""
def __init__(... |
class LxmlXMLFormatter(_BaseXMLFormatter):
'''
Class for formatting data in xml using Python standard library
modules: `xml.etree.ElementTree` and `xml.dom.minidom`.
'''
def __init__(self, *args, **kwargs) -> None:
pass
def _build_tree(self) -> bytes:
'''
Build tree fr... | 8 | 4 | 19 | 3 | 13 | 3 | 3 | 0.27 | 1 | 5 | 0 | 0 | 6 | 6 | 6 | 19 | 123 | 26 | 77 | 37 | 57 | 21 | 48 | 22 | 38 | 5 | 1 | 3 | 15 |
7,549 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/formats/xml.py | pandas.io.formats.xml._BaseXMLFormatter | from pandas.core.shared_docs import _shared_docs
from pandas.io.common import get_handle
from pandas.errors import AbstractMethodError
import codecs
from pandas.core.dtypes.missing import isna
from pandas.core.dtypes.common import is_list_like
from typing import TYPE_CHECKING, Any, final
from pandas.util._decorators im... | @doc(storage_options=_shared_docs['storage_options'], compression_options=_shared_docs['compression_options'] % 'path_or_buffer')
class _BaseXMLFormatter:
'''
Subclass for formatting data in XML.
Parameters
----------
path_or_buffer : str or file-like
This can be either a string of raw XML, ... | 25 | 10 | 17 | 3 | 10 | 4 | 3 | 0.67 | 0 | 14 | 0 | 2 | 13 | 19 | 13 | 13 | 299 | 64 | 141 | 76 | 99 | 94 | 92 | 45 | 78 | 5 | 0 | 3 | 33 |
7,550 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/html.py | pandas.io.html._BeautifulSoupHtml5LibFrameParser | import re
class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):
"""
HTML to DataFrame parser that uses BeautifulSoup under the hood.
See Also
--------
pandas.io.html._HtmlFrameParser
pandas.io.html._LxmlFrameParser
Notes
-----
Documentation strings for this class are in the b... |
class _BeautifulSoupHtml5LibFrameParser(_HtmlFrameParser):
'''
HTML to DataFrame parser that uses BeautifulSoup under the hood.
See Also
--------
pandas.io.html._HtmlFrameParser
pandas.io.html._LxmlFrameParser
Notes
-----
Documentation strings for this class are in the base class
... | 11 | 1 | 6 | 1 | 6 | 0 | 2 | 0.21 | 1 | 5 | 0 | 0 | 10 | 0 | 10 | 25 | 88 | 20 | 56 | 27 | 44 | 12 | 55 | 27 | 43 | 8 | 1 | 3 | 21 |
7,551 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/html.py | pandas.io.html._HtmlFrameParser | from re import Pattern
from pandas.errors import AbstractMethodError, EmptyDataError
from typing import TYPE_CHECKING, Literal, cast
class _HtmlFrameParser:
"""
Base class for parsers that parse HTML into DataFrames.
Parameters
----------
io : str or file-like
This can be either a string p... |
class _HtmlFrameParser:
'''
Base class for parsers that parse HTML into DataFrames.
Parameters
----------
io : str or file-like
This can be either a string path, a valid URL using the HTTP,
FTP, or FILE protocols or a file-like object.
match : str or regex
The text to ma... | 17 | 15 | 23 | 3 | 8 | 12 | 2 | 2.04 | 0 | 10 | 0 | 2 | 15 | 7 | 15 | 15 | 441 | 78 | 120 | 58 | 88 | 245 | 93 | 43 | 76 | 15 | 0 | 4 | 33 |
7,552 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/html.py | pandas.io.html._LxmlFrameParser | from pandas.io.common import get_handle, is_url, stringify_path, validate_header_arg
import os
import errno
class _LxmlFrameParser(_HtmlFrameParser):
"""
HTML to DataFrame parser that uses lxml under the hood.
Warning
-------
This parser can only handle HTTP, FTP, and FILE urls.
See Also
... |
class _LxmlFrameParser(_HtmlFrameParser):
'''
HTML to DataFrame parser that uses lxml under the hood.
Warning
-------
This parser can only handle HTTP, FTP, and FILE urls.
See Also
--------
_HtmlFrameParser
_BeautifulSoupLxmlFrameParser
Notes
-----
Documentation strings ... | 10 | 2 | 12 | 1 | 7 | 3 | 3 | 0.65 | 1 | 6 | 0 | 0 | 9 | 1 | 9 | 24 | 137 | 25 | 68 | 31 | 53 | 44 | 62 | 26 | 50 | 8 | 1 | 4 | 24 |
7,553 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.FrameParser | from pandas.io.json._table_schema import build_table_schema, parse_table_schema, set_default_names
from pandas import ArrowDtype, DataFrame, Index, MultiIndex, Series, isna, notna, to_datetime
from pandas.io.common import IOHandles, dedup_names, get_handle, is_potential_multi_index, stringify_path
from pandas._libs.jso... |
class FrameParser(Parser):
def _parse(self) -> DataFrame:
pass
def _try_convert_types(self, obj: DataFrame) -> DataFrame:
pass | 3 | 0 | 24 | 1 | 23 | 1 | 4 | 0.02 | 1 | 3 | 0 | 0 | 2 | 3 | 2 | 10 | 53 | 3 | 49 | 15 | 46 | 1 | 21 | 12 | 18 | 5 | 1 | 1 | 7 |
7,554 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.FrameWriter | from typing import TYPE_CHECKING, Any, Generic, Literal, Self, TypeVar, final, overload
class FrameWriter(Writer):
_default_orient = 'columns'
@property
def obj_to_write(self) -> NDFrame | Mapping[IndexLabel, Any]:
if not self.index and self.orient == 'split':
obj_to_write = self.obj.t... |
class FrameWriter(Writer):
@property
def obj_to_write(self) -> NDFrame | Mapping[IndexLabel, Any]:
pass
def _format_axes(self) -> None:
'''
Try to format axes if they are datelike.
'''
pass | 4 | 1 | 12 | 0 | 10 | 2 | 3 | 0.13 | 1 | 2 | 0 | 1 | 2 | 1 | 2 | 26 | 28 | 2 | 23 | 7 | 19 | 3 | 13 | 5 | 10 | 3 | 5 | 1 | 5 |
7,555 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.JSONTableWriter | from pandas.io.json._table_schema import build_table_schema, parse_table_schema, set_default_names
from pandas import ArrowDtype, DataFrame, Index, MultiIndex, Series, isna, notna, to_datetime
from typing import TYPE_CHECKING, Any, Generic, Literal, Self, TypeVar, final, overload
from pandas.core.dtypes.dtypes import P... |
class JSONTableWriter(FrameWriter):
def __init__(self, obj, orient: str | None, date_format: str, double_precision: int, ensure_ascii: bool, date_unit: str, index: bool, default_handler: Callable[[Any], JSONSerializable] | None=None, indent: int=0) -> None:
'''
Adds a `schema` attribute with the T... | 4 | 1 | 39 | 3 | 31 | 5 | 5 | 0.16 | 1 | 9 | 0 | 0 | 2 | 5 | 2 | 28 | 82 | 8 | 64 | 24 | 49 | 10 | 33 | 12 | 30 | 9 | 6 | 3 | 10 |
7,556 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.JsonReader | from pandas.compat._optional import import_optional_dependency
from collections import abc
from typing import TYPE_CHECKING, Any, Generic, Literal, Self, TypeVar, final, overload
from pandas.io._util import arrow_table_to_pandas
from pandas._libs import lib
from pandas.io.common import IOHandles, dedup_names, get_handl... |
class JsonReader(abc.Iterator, Generic[FrameSeriesStrT]):
'''
JsonReader provides an interface for reading in a JSON file.
If initialized with ``lines=True`` and ``chunksize``, can be iterated over
``chunksize`` lines at a time. Otherwise, calling ``read`` reads in the
whole document.
'''
... | 25 | 8 | 13 | 0 | 11 | 1 | 3 | 0.15 | 2 | 15 | 2 | 0 | 16 | 20 | 16 | 41 | 241 | 23 | 190 | 85 | 146 | 28 | 122 | 50 | 105 | 11 | 5 | 4 | 41 |
7,557 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.Parser | from pandas._libs.tslibs import iNaT
from typing import TYPE_CHECKING, Any, Generic, Literal, Self, TypeVar, final, overload
from pandas import ArrowDtype, DataFrame, Index, MultiIndex, Series, isna, notna, to_datetime
import numpy as np
from pandas.errors import AbstractMethodError
from pandas.core.dtypes.common impor... |
class Parser:
def __init__(self, json: str, orient, dtype: DtypeArg | None=None, convert_axes: bool=True, convert_dates: bool | list[str]=True, keep_default_dates: bool=False, precise_float: bool=False, date_unit=None, dtype_backend: DtypeBackend | lib.NoDefault=lib.no_default) -> None:
pass
@final
... | 14 | 4 | 25 | 3 | 19 | 3 | 6 | 0.15 | 0 | 12 | 0 | 2 | 8 | 9 | 8 | 8 | 225 | 31 | 169 | 60 | 137 | 25 | 123 | 37 | 114 | 23 | 0 | 4 | 47 |
7,558 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.SeriesParser | from pandas._libs.json import ujson_dumps, ujson_loads
from pandas import ArrowDtype, DataFrame, Index, MultiIndex, Series, isna, notna, to_datetime
class SeriesParser(Parser):
_default_orient = 'index'
_split_keys = ('name', 'index', 'data')
def _parse(self) -> Series:
data = ujson_loads(self.jso... |
class SeriesParser(Parser):
def _parse(self) -> Series:
pass
def _try_convert_types(self, obj: Series) -> Series:
pass | 3 | 0 | 6 | 1 | 6 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 2 | 1 | 2 | 10 | 17 | 3 | 14 | 8 | 11 | 0 | 13 | 8 | 10 | 2 | 1 | 1 | 3 |
7,559 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.SeriesWriter | from typing import TYPE_CHECKING, Any, Generic, Literal, Self, TypeVar, final, overload
class SeriesWriter(Writer):
_default_orient = 'index'
@property
def obj_to_write(self) -> NDFrame | Mapping[IndexLabel, Any]:
if not self.index and self.orient == 'split':
return {'name': self.obj.n... |
class SeriesWriter(Writer):
@property
def obj_to_write(self) -> NDFrame | Mapping[IndexLabel, Any]:
pass
def _format_axes(self) -> None:
pass | 4 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 26 | 13 | 2 | 11 | 5 | 7 | 0 | 9 | 4 | 6 | 2 | 5 | 1 | 4 |
7,560 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/json/_json.py | pandas.io.json._json.Writer | from pandas.errors import AbstractMethodError
from pandas._libs.json import ujson_dumps, ujson_loads
from typing import TYPE_CHECKING, Any, Generic, Literal, Self, TypeVar, final, overload
from abc import ABC, abstractmethod
class Writer(ABC):
_default_orient: str
def __init__(self, obj: NDFrame, orient: str ... |
class Writer(ABC):
def __init__(self, obj: NDFrame, orient: str | None, date_format: str, double_precision: int, ensure_ascii: bool, date_unit: str, index: bool, default_handler: Callable[[Any], JSONSerializable] | None=None, indent: int=0) -> None:
pass
def _format_axes(self) -> None:
pass
... | 7 | 1 | 11 | 1 | 10 | 0 | 1 | 0.02 | 1 | 6 | 0 | 2 | 4 | 9 | 4 | 24 | 50 | 6 | 43 | 27 | 25 | 1 | 21 | 15 | 16 | 2 | 4 | 1 | 5 |
7,561 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parquet.py | pandas.io.parquet.BaseImpl | from pandas import DataFrame, get_option
from pandas.errors import AbstractMethodError, Pandas4Warning
class BaseImpl:
@staticmethod
def validate_dataframe(df: DataFrame) -> None:
if not isinstance(df, DataFrame):
raise ValueError('to_parquet only supports IO with DataFrames')
def wri... |
class BaseImpl:
@staticmethod
def validate_dataframe(df: DataFrame) -> None:
pass
def write(self, df: DataFrame, path, compression, **kwargs) -> None:
pass
def read(self, path, columns=None, **kwargs) -> DataFrame:
pass | 5 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 2 | 0 | 2 | 2 | 0 | 3 | 3 | 11 | 2 | 9 | 5 | 4 | 0 | 8 | 4 | 4 | 2 | 0 | 1 | 4 |
7,562 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parquet.py | pandas.io.parquet.FastParquetImpl | from pandas.errors import AbstractMethodError, Pandas4Warning
from typing import TYPE_CHECKING, Any, Literal
import os
from pandas.io.common import IOHandles, get_handle, is_fsspec_url, is_url, stringify_path
from warnings import catch_warnings, filterwarnings
from pandas._libs import lib
from pandas import DataFrame, ... |
class FastParquetImpl(BaseImpl):
def __init__(self) -> None:
pass
def write(self, df: DataFrame, path, compression: Literal['snappy', 'gzip', 'brotli'] | None='snappy', index=None, partition_cols=None, storage_options: StorageOptions | None=None, filesystem=None, **kwargs) -> None:
pass
... | 4 | 0 | 38 | 3 | 33 | 3 | 5 | 0.08 | 1 | 7 | 0 | 0 | 3 | 1 | 3 | 6 | 118 | 10 | 100 | 31 | 77 | 8 | 45 | 12 | 41 | 7 | 1 | 2 | 15 |
7,563 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parquet.py | pandas.io.parquet.PyArrowImpl | from typing import TYPE_CHECKING, Any, Literal
import json
from pandas.io._util import arrow_table_to_pandas
from pandas.errors import AbstractMethodError, Pandas4Warning
import io
from pandas._libs import lib
from pandas import DataFrame, get_option
from warnings import catch_warnings, filterwarnings
from pandas.compa... |
class PyArrowImpl(BaseImpl):
def __init__(self) -> None:
pass
def write(self, df: DataFrame, path: FilePath | WriteBuffer[bytes], compression: ParquetCompressionOptions='snappy', index: bool | None=None, storage_options: StorageOptions | None=None, partition_cols: list[str] | None=None, filesystem=No... | 4 | 0 | 41 | 3 | 37 | 1 | 4 | 0.04 | 1 | 9 | 0 | 0 | 3 | 1 | 3 | 6 | 125 | 11 | 111 | 37 | 85 | 4 | 43 | 17 | 37 | 7 | 1 | 3 | 12 |
7,564 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/arrow_parser_wrapper.py | pandas.io.parsers.arrow_parser_wrapper.ArrowParserWrapper | from pandas.core.dtypes.common import pandas_dtype
from pandas.util._exceptions import find_stack_level
from pandas.errors import Pandas4Warning, ParserError, ParserWarning
from pandas.core.dtypes.inference import is_integer
import warnings
from pandas.io._util import arrow_table_to_pandas
from pandas.compat._optional ... |
class ArrowParserWrapper(ParserBase):
'''
Wrapper for the pyarrow engine for read_csv()
'''
def __init__(self, src: ReadBuffer[bytes], **kwds) -> None:
pass
def _parse_kwds(self) -> None:
'''
Validates keywords before passing to pyarrow.
'''
pass
def _... | 12 | 5 | 38 | 4 | 28 | 7 | 6 | 0.26 | 1 | 16 | 0 | 0 | 6 | 9 | 6 | 33 | 270 | 32 | 189 | 43 | 181 | 50 | 109 | 40 | 101 | 16 | 1 | 4 | 43 |
7,565 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/base_parser.py | pandas.io.parsers.base_parser.ParserBase | from pandas.core.dtypes.missing import isna
from pandas.io.common import is_potential_multi_index
from collections import defaultdict
from pandas.core.indexes.api import Index, MultiIndex, default_index, ensure_index_from_sequences
import pandas._libs.ops as libops
from copy import copy
import warnings
import itertools... | null | 36 | 6 | 33 | 4 | 23 | 6 | 6 | 0.27 | 0 | 30 | 1 | 0 | 17 | 20 | 17 | 17 | 669 | 92 | 458 | 153 | 389 | 123 | 309 | 103 | 288 | 22 | 0 | 4 | 111 |
7,566 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/c_parser_wrapper.py | pandas.io.parsers.c_parser_wrapper.CParserWrapper | from pandas.io.common import dedup_names, is_potential_multi_index
from pandas.io.parsers.base_parser import ParserBase, ParserError, date_converter, evaluate_callable_usecols, is_index_col, validate_parse_dates_presence
from pandas.core.indexes.api import ensure_index_from_sequences
from pandas.compat._optional import... |
class CParserWrapper(ParserBase):
def __init__(self, src: ReadCsvBuffer[str], **kwds) -> None:
pass
def close(self) -> None:
pass
def _set_noconvert_columns(self) -> None:
'''
Set the columns that should not undergo dtype conversions.
Currently, any column that is... | 5 | 1 | 69 | 12 | 44 | 19 | 7 | 0.41 | 1 | 16 | 0 | 0 | 4 | 11 | 4 | 31 | 283 | 52 | 179 | 42 | 167 | 74 | 110 | 30 | 105 | 13 | 1 | 3 | 28 |
7,567 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/python_parser.py | pandas.io.parsers.python_parser.FixedWidthFieldParser | from typing import IO, TYPE_CHECKING, Any, DefaultDict, Literal, cast, final
class FixedWidthFieldParser(PythonParser):
"""
Specialization that Converts fixed-width fields into DataFrames.
See PythonParser for details.
"""
def __init__(self, f: ReadCsvBuffer[str], **kwds) -> None:
self.col... |
class FixedWidthFieldParser(PythonParser):
'''
Specialization that Converts fixed-width fields into DataFrames.
See PythonParser for details.
'''
def __init__(self, f: ReadCsvBuffer[str], **kwds) -> None:
pass
def _make_reader(self, f: IO[str] | ReadCsvBuffer[str]) -> FixedWidthReader... | 4 | 2 | 9 | 0 | 6 | 2 | 1 | 0.5 | 1 | 5 | 1 | 0 | 3 | 2 | 3 | 59 | 34 | 4 | 20 | 6 | 16 | 10 | 9 | 6 | 5 | 1 | 2 | 0 | 3 |
7,568 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/python_parser.py | pandas.io.parsers.python_parser.FixedWidthReader | import re
from pandas.errors import EmptyDataError, ParserError, ParserWarning
from collections import abc, defaultdict
import numpy as np
from typing import IO, TYPE_CHECKING, Any, DefaultDict, Literal, cast, final
class FixedWidthReader(abc.Iterator):
"""
A reader of fixed-width lines.
"""
def __ini... |
class FixedWidthReader(abc.Iterator):
'''
A reader of fixed-width lines.
'''
def __init__(self, f: IO[str] | ReadCsvBuffer[str], colspecs: list[tuple[int, int]] | Literal['infer'], delimiter: str | None, comment: str | None, skiprows: set[int] | None=None, infer_nrows: int=100) -> None:
pass
... | 5 | 2 | 27 | 2 | 20 | 7 | 5 | 0.37 | 1 | 13 | 0 | 0 | 4 | 5 | 4 | 29 | 116 | 10 | 79 | 34 | 64 | 29 | 54 | 24 | 49 | 6 | 5 | 2 | 19 |
7,569 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/python_parser.py | pandas.io.parsers.python_parser.PythonParser | import numpy as np
from pandas.util._decorators import cache_readonly
import csv
from pandas._libs import lib
from pandas.errors import EmptyDataError, ParserError, ParserWarning
from pandas.core.dtypes.common import is_bool_dtype, is_extension_array_dtype, is_integer, is_numeric_dtype, is_object_dtype, is_string_dtype... |
class PythonParser(ParserBase):
def __init__(self, f: ReadCsvBuffer[str] | list, **kwds) -> None:
'''
Workhorse function for processing nested list into DataFrame
'''
pass
@cache_readonly
def num(self) -> re.Pattern:
pass
def _make_reader(self, f: IO[str] | Rea... | 37 | 10 | 41 | 5 | 30 | 7 | 7 | 0.22 | 1 | 35 | 1 | 1 | 29 | 32 | 29 | 56 | 1,272 | 184 | 902 | 252 | 829 | 202 | 617 | 197 | 585 | 37 | 1 | 7 | 204 |
7,570 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/readers.py | pandas.io.parsers.readers.TextFileReader | from pandas.errors import AbstractMethodError, ParserWarning
from pandas.util._exceptions import find_stack_level
from pandas.io.parsers.base_parser import ParserBase, is_index_col, parser_defaults
import sys
from typing import IO, TYPE_CHECKING, Any, Generic, Literal, Self, TypedDict, Unpack, cast, overload
from panda... |
class TextFileReader(abc.Iterator):
'''
Passed dialect overrides any of the related parser options
'''
def __init__(self, f: FilePath | ReadCsvBuffer[bytes] | ReadCsvBuffer[str] | list, engine: CSVEngine | None=None, **kwds) -> None:
pass
def close(self) -> None:
pass
def _ge... | 13 | 1 | 34 | 4 | 29 | 2 | 7 | 0.08 | 1 | 28 | 0 | 0 | 12 | 9 | 12 | 37 | 431 | 58 | 347 | 78 | 318 | 29 | 222 | 60 | 209 | 30 | 5 | 4 | 84 |
7,571 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/readers.py | pandas.io.parsers.readers._C_Parser_Defaults | from typing import IO, TYPE_CHECKING, Any, Generic, Literal, Self, TypedDict, Unpack, cast, overload
class _C_Parser_Defaults(TypedDict):
na_filter: Literal[True]
low_memory: Literal[True]
memory_map: Literal[False]
float_precision: None |
class _C_Parser_Defaults(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 1 | 4 | 0 | 5 | 1 | 4 | 0 | 1 | 0 | 0 |
7,572 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/parsers/readers.py | pandas.io.parsers.readers._Fwf_Defaults | from typing import IO, TYPE_CHECKING, Any, Generic, Literal, Self, TypedDict, Unpack, cast, overload
class _Fwf_Defaults(TypedDict):
colspecs: Literal['infer']
infer_nrows: Literal[100]
widths: None |
class _Fwf_Defaults(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
7,573 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.AppendableFrameTable | from pandas.compat import HAS_PYARROW
from pandas.core.arrays import Categorical, DatetimeArray, PeriodArray
from pandas._config import config, get_option, using_string_dtype
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
import... |
class AppendableFrameTable(AppendableTable):
'''support the new appendable table formats'''
@property
def is_transposed(self) -> bool:
pass
@classmethod
def get_object(cls, obj, transposed: bool):
'''these are written transposed'''
pass
def read(self, where=None, column... | 6 | 2 | 31 | 4 | 24 | 3 | 6 | 0.11 | 1 | 6 | 1 | 3 | 2 | 0 | 3 | 70 | 106 | 17 | 80 | 31 | 68 | 9 | 56 | 23 | 52 | 14 | 3 | 2 | 17 |
7,574 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.AppendableMultiFrameTable | from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
import re
class AppendableMultiFrameTable(AppendableFrameTable):
"""a frame with a multi-index"""
table_type = 'appendable_multiframe'
obj_type = DataFrame
ndim = 2... |
class AppendableMultiFrameTable(AppendableFrameTable):
'''a frame with a multi-index'''
@property
def table_type_short(self) -> str:
pass
def write(self, obj, data_columns=None, **kwargs) -> None:
pass
def read(self, where=None, columns=None, start: int | None=None, stop: int | No... | 5 | 1 | 10 | 1 | 9 | 1 | 3 | 0.16 | 1 | 4 | 0 | 0 | 3 | 1 | 3 | 73 | 41 | 6 | 32 | 18 | 21 | 5 | 22 | 11 | 18 | 5 | 4 | 2 | 8 |
7,575 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.AppendableMultiSeriesTable | from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
class AppendableMultiSeriesTable(AppendableSeriesTable):
"""support the new appendable table formats"""
pandas_kind = 'series_table'
table_type = 'appendable_multiserie... |
class AppendableMultiSeriesTable(AppendableSeriesTable):
'''support the new appendable table formats'''
def write(self, obj, **kwargs) -> None:
'''we are going to write this as a frame table'''
pass | 2 | 2 | 9 | 0 | 8 | 3 | 1 | 0.45 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 75 | 16 | 2 | 11 | 7 | 9 | 5 | 11 | 7 | 9 | 1 | 5 | 0 | 1 |
7,576 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.AppendableSeriesTable | from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
class AppendableSeriesTable(AppendableFrameTable):
"""support the new appendable table formats"""
pandas_kind = 'series_table'
table_type = 'appendable_series'
ndim... |
class AppendableSeriesTable(AppendableFrameTable):
'''support the new appendable table formats'''
@property
def is_transposed(self) -> bool:
pass
@classmethod
def get_object(cls, obj, transposed: bool):
pass
def write(self, obj, data_columns=None, **kwargs) -> None:
'''... | 7 | 2 | 8 | 1 | 7 | 1 | 3 | 0.17 | 1 | 5 | 0 | 1 | 3 | 1 | 4 | 74 | 47 | 7 | 36 | 22 | 23 | 6 | 28 | 13 | 23 | 6 | 4 | 3 | 10 |
7,577 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.AppendableTable | import numpy as np
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
class AppendableTable(Table):
"""support the new appendable table formats"""
table_type = 'appendable'
def write(self, obj, axes=None, append: bool=... |
class AppendableTable(Table):
'''support the new appendable table formats'''
def write(self, obj, axes=None, append: bool=False, complib=None, complevel=None, fletcher32=None, min_itemsize=None, chunksize: int | None=None, expectedrows=None, dropna: bool=False, nan_rep=None, data_columns=None, track_times: bo... | 5 | 3 | 55 | 8 | 37 | 11 | 9 | 0.3 | 1 | 8 | 1 | 1 | 4 | 1 | 4 | 67 | 227 | 36 | 148 | 66 | 120 | 45 | 104 | 42 | 99 | 11 | 2 | 3 | 35 |
7,578 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.BlockManagerFixed | from pandas._config import config, get_option, using_string_dtype
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
from pandas._libs.lib import is_string_array
import numpy as np
class BlockManagerFixed(GenericFixed):
attribu... |
class BlockManagerFixed(GenericFixed):
@property
def shape(self) -> list[int] | None:
pass
def read(self, where=None, columns=None, start: int | None=None, stop: int | None=None) -> DataFrame:
pass
def write(self, obj, **kwargs) -> None:
pass | 5 | 0 | 28 | 4 | 22 | 2 | 5 | 0.07 | 1 | 8 | 0 | 1 | 3 | 0 | 3 | 44 | 92 | 17 | 70 | 32 | 59 | 5 | 58 | 25 | 54 | 6 | 2 | 3 | 16 |
7,579 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.DataCol | from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype, PeriodDtype
from pandas.core.arrays import Categorical, DatetimeArray, PeriodArray
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
from pand... |
class DataCol(IndexCol):
'''
a data holding column, by definition this is not indexable
Parameters
----------
data : the actual data
cname : the column name in the table to hold the data (typically
values)
meta : a string description of the metadata
metadata : the a... | 29 | 9 | 13 | 1 | 10 | 3 | 2 | 0.29 | 1 | 14 | 0 | 1 | 12 | 3 | 18 | 43 | 282 | 42 | 187 | 72 | 143 | 55 | 115 | 47 | 96 | 12 | 1 | 3 | 40 |
7,580 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.DataIndexableCol | from pandas.core.dtypes.common import ensure_object, is_bool_dtype, is_complex_dtype, is_list_like, is_string_dtype, needs_i8_conversion
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
class DataIndexableCol(DataCol):
"""rep... |
class DataIndexableCol(DataCol):
'''represent a data column that can be indexed'''
def validate_names(self) -> None:
pass
@classmethod
def get_atom_string(cls, shape, itemsize):
pass
@classmethod
def get_atom_data(cls, shape, kind: str) -> Col:
pass
@classmethod
... | 10 | 1 | 2 | 0 | 2 | 0 | 1 | 0.12 | 1 | 2 | 0 | 1 | 1 | 0 | 5 | 48 | 25 | 6 | 17 | 11 | 7 | 2 | 13 | 7 | 7 | 2 | 2 | 1 | 6 |
7,581 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.Fixed | import pandas.core.common as com
from typing import TYPE_CHECKING, Any, Final, Literal, Self, TypeAlias, cast, overload
import copy
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
from pandas.io.formats.printing import adjoin, pp... |
class Fixed:
'''
represent an object in my store
facilitate read/write of various types of objects
this is an abstract base class
Parameters
----------
parent : HDFStore
group : Node
The group node where the table resides.
'''
def __init__(self, parent: HDFStore, group:... | 39 | 11 | 5 | 0 | 4 | 1 | 1 | 0.25 | 0 | 10 | 1 | 2 | 25 | 3 | 25 | 25 | 171 | 28 | 117 | 64 | 64 | 29 | 85 | 37 | 59 | 3 | 0 | 2 | 32 |
7,582 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.FrameFixed | from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
class FrameFixed(BlockManagerFixed):
pandas_kind = 'frame'
obj_type = DataFrame |
class FrameFixed(BlockManagerFixed):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 3 | 0 | 0 |
7,583 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.GenericDataIndexableCol | class GenericDataIndexableCol(DataIndexableCol):
"""represent a generic pytables data column""" | class GenericDataIndexableCol(DataIndexableCol):
'''represent a generic pytables data column'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 48 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
7,584 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.GenericFixed | from pandas.errors import AttributeConflictWarning, ClosedFileError, IncompatibilityWarning, PerformanceWarning, PossibleDataLossError
from pandas.core.arrays.string_ import BaseStringArray
import warnings
from pandas.util._exceptions import find_stack_level
from pandas._libs import lib, writers as libwriters
from cont... |
class GenericFixed(Fixed):
'''a generified fixed version'''
def _class_to_alias(self, cls) -> str:
pass
def _alias_to_class(self, alias):
pass
def _get_index_factory(self, attrs):
pass
def f(values, freq=None, tz=None):
pass
d... | 20 | 6 | 19 | 3 | 15 | 2 | 3 | 0.16 | 1 | 23 | 0 | 2 | 16 | 3 | 16 | 41 | 357 | 65 | 255 | 86 | 226 | 42 | 193 | 76 | 173 | 17 | 1 | 2 | 62 |
7,585 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.GenericIndexCol | import numpy as np
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
class GenericIndexCol(IndexCol):
"""an index which is not represented in the data of the table"""
@property
def is_indexed(self) -> bool:
re... |
class GenericIndexCol(IndexCol):
'''an index which is not represented in the data of the table'''
@property
def is_indexed(self) -> bool:
pass
def convert(self, values: np.ndarray, nan_rep, encoding: str, errors: str) -> tuple[Index, Index]:
'''
Convert the data from this selec... | 5 | 2 | 7 | 1 | 3 | 3 | 1 | 0.83 | 1 | 4 | 0 | 0 | 3 | 0 | 3 | 28 | 27 | 5 | 12 | 8 | 5 | 10 | 9 | 5 | 5 | 1 | 1 | 0 | 3 |
7,586 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.GenericTable | from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
from pandas.util._decorators import cache_readonly
class GenericTable(AppendableFrameTable):
"""a table that read/writes the generic pytables table format"""
pandas_kind = ... |
class GenericTable(AppendableFrameTable):
'''a table that read/writes the generic pytables table format'''
@property
def pandas_type(self) -> str:
pass
@property
def storable(self):
pass
def get_attrs(self) -> None:
'''retrieve our attributes'''
pass
@cache_... | 9 | 3 | 10 | 1 | 7 | 1 | 2 | 0.17 | 1 | 6 | 2 | 0 | 5 | 6 | 5 | 75 | 65 | 12 | 46 | 27 | 37 | 8 | 33 | 23 | 27 | 4 | 4 | 1 | 8 |
7,587 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.HDFStore | import os
import itertools
from pandas._config import config, get_option, using_string_dtype
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
from pandas.io.formats.printing import adjoin, pprint_thing
import pandas.core.common as... |
class HDFStore:
'''
Dict-like IO interface for storing pandas objects in PyTables.
Either Fixed or Table format.
.. warning::
Pandas uses PyTables for reading and writing HDF5 files, which allows
serializing object-dtype data with pickle when using the "fixed" format.
Loading pickl... | 49 | 30 | 31 | 3 | 16 | 12 | 4 | 0.83 | 0 | 35 | 11 | 0 | 43 | 5 | 43 | 43 | 1,516 | 202 | 724 | 263 | 542 | 599 | 419 | 123 | 373 | 20 | 0 | 5 | 162 |
7,588 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.IndexCol | from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, ExtensionDtype, PeriodDtype
from pandas.compat import HAS_PYARROW
from pandas._config import config, get_option, using_string_dtype
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, Timed... | null | 33 | 15 | 10 | 1 | 8 | 2 | 2 | 0.25 | 0 | 15 | 1 | 2 | 25 | 14 | 25 | 25 | 297 | 42 | 204 | 83 | 153 | 52 | 139 | 58 | 113 | 8 | 0 | 3 | 53 |
7,589 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.Selection | from pandas.core.computation.pytables import PyTablesExpr, maybe_expression
import numpy as np
from typing import TYPE_CHECKING, Any, Final, Literal, Self, TypeAlias, cast, overload
from pandas.core.dtypes.common import ensure_object, is_bool_dtype, is_complex_dtype, is_list_like, is_string_dtype, needs_i8_conversion
f... |
class Selection:
'''
Carries out a selection operation on a tables.Table object.
Parameters
----------
table : a Table object
where : list of Terms (or convertible to)
start, stop: indices to start and/or stop selection
'''
def __init__(self, table: Table, where=None, start: int | ... | 9 | 4 | 17 | 1 | 14 | 2 | 4 | 0.22 | 0 | 10 | 1 | 0 | 6 | 8 | 6 | 6 | 121 | 14 | 88 | 30 | 75 | 19 | 61 | 21 | 54 | 10 | 0 | 5 | 25 |
7,590 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.SeriesFixed | from pandas._config import config, get_option, using_string_dtype
from pandas import DataFrame, DatetimeIndex, Index, MultiIndex, PeriodIndex, RangeIndex, Series, StringDtype, TimedeltaIndex, concat, isna
from pandas.compat import HAS_PYARROW
import numpy as np
class SeriesFixed(GenericFixed):
pandas_kind = 'serie... |
class SeriesFixed(GenericFixed):
@property
def shape(self) -> tuple[int] | None:
pass
def read(self, where=None, columns=None, start: int | None=None, stop: int | None=None) -> Series:
pass
def write(self, obj, **kwargs) -> None:
pass | 5 | 0 | 9 | 0 | 9 | 0 | 2 | 0 | 1 | 7 | 0 | 0 | 3 | 0 | 3 | 44 | 37 | 4 | 33 | 16 | 22 | 0 | 22 | 9 | 18 | 2 | 2 | 1 | 5 |
7,591 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.Table | from typing import TYPE_CHECKING, Any, Final, Literal, Self, TypeAlias, cast, overload
from pandas.core.dtypes.missing import array_equivalent
from pandas.errors import AttributeConflictWarning, ClosedFileError, IncompatibilityWarning, PerformanceWarning, PossibleDataLossError
import warnings
from pandas.core.indexes.a... |
class Table(Fixed):
'''
represent a table:
facilitate read/write of various types of tables
Attrs in Table Node
-------------------
These are attributes that are store in the main table node, they are
necessary to recreate these tables when read back in.
index_axes : a list of tu... | 57 | 31 | 24 | 3 | 16 | 5 | 3 | 0.33 | 1 | 28 | 5 | 2 | 36 | 10 | 38 | 63 | 996 | 149 | 646 | 238 | 543 | 212 | 418 | 170 | 376 | 19 | 1 | 5 | 131 |
7,592 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.TableIterator | class TableIterator:
"""
Define the iteration interface on a table
Parameters
----------
store : HDFStore
s : the referred storer
func : the function to execute the query
where : the where of the query
nrows : the rows to iterate on
start : the passed start value (default i... | null | 5 | 1 | 21 | 3 | 17 | 1 | 5 | 0.31 | 0 | 8 | 3 | 0 | 4 | 7 | 4 | 4 | 110 | 16 | 72 | 29 | 55 | 22 | 56 | 17 | 51 | 7 | 0 | 2 | 18 |
7,593 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/pytables.py | pandas.io.pytables.WORMTable | class WORMTable(Table):
"""
a write-once read-many table: this format DOES NOT ALLOW appending to a
table. writing is a one-time operation the data are stored in a format
that allows for searching the data on disk
"""
table_type = 'worm'
def read(self, where=None, columns=None, start: int |... | class WORMTable(Table):
'''
a write-once read-many table: this format DOES NOT ALLOW appending to a
table. writing is a one-time operation the data are stored in a format
that allows for searching the data on disk
'''
def read(self, where=None, columns=None, start: int | None=None, stop: int | ... | 3 | 3 | 9 | 0 | 5 | 4 | 1 | 1.08 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 65 | 28 | 3 | 12 | 10 | 3 | 13 | 6 | 4 | 3 | 1 | 2 | 0 | 2 |
7,594 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/sas/sas7bdat.py | pandas.io.sas.sas7bdat.SAS7BDATReader | from pandas.errors import EmptyDataError
import pandas as pd
from datetime import datetime
import numpy as np
from pandas import DataFrame, Timestamp
import pandas.io.sas.sas_constants as const
from pandas._libs.byteswap import read_double_with_byteswap, read_float_with_byteswap, read_uint16_with_byteswap, read_uint32_... |
class SAS7BDATReader(SASReader):
'''
Read SAS files in SAS7BDAT format.
Parameters
----------
path_or_buf : path name or buffer
Name of SAS file or file-like object pointing to SAS file
contents.
index : column identifier, defaults to None
Column to use as index.
con... | 28 | 4 | 21 | 2 | 18 | 1 | 3 | 0.1 | 1 | 17 | 1 | 0 | 27 | 47 | 27 | 27 | 620 | 83 | 490 | 174 | 451 | 50 | 346 | 162 | 318 | 12 | 1 | 4 | 85 |
7,595 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/sas/sas7bdat.py | pandas.io.sas.sas7bdat._Column | class _Column:
col_id: int
name: str | bytes
label: str | bytes
format: str | bytes
ctype: bytes
length: int
def __init__(self, col_id: int, name: str | bytes, label: str | bytes, format: str | bytes, ctype: bytes, length: int) -> None:
self.col_id = col_id
self.name = name
... | class _Column:
def __init__(self, col_id: int, name: str | bytes, label: str | bytes, format: str | bytes, ctype: bytes, length: int) -> None:
pass | 2 | 0 | 16 | 0 | 15 | 1 | 1 | 0.05 | 0 | 3 | 0 | 0 | 1 | 1 | 1 | 1 | 24 | 1 | 22 | 11 | 12 | 1 | 14 | 3 | 12 | 1 | 0 | 0 | 1 |
7,596 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/sas/sas_constants.py | pandas.io.sas.sas_constants.SASIndex | from typing import Final
class SASIndex:
row_size_index: Final = 0
column_size_index: Final = 1
subheader_counts_index: Final = 2
column_text_index: Final = 3
column_name_index: Final = 4
column_attributes_index: Final = 5
format_and_label_index: Final = 6
column_list_index: Final = 7
... |
class SASIndex:
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0 | 10 | 10 | 9 | 0 | 10 | 10 | 9 | 0 | 0 | 0 | 0 |
7,597 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/sas/sas_xport.py | pandas.io.sas.sas_xport.XportReader | from pandas.util._exceptions import find_stack_level
import numpy as np
import pandas as pd
import struct
from pandas.util._decorators import Appender
from pandas.io.sas.sasreader import SASReader
from pandas.io.common import get_handle
import warnings
class XportReader(SASReader):
__doc__ = _xport_reader_doc
... |
class XportReader(SASReader):
def __init__(self, filepath_or_buffer: FilePath | ReadBuffer[bytes], index=None, encoding: str | None='ISO-8859-1', chunksize: int | None=None, compression: CompressionOptions='infer') -> None:
pass
def close(self) -> None:
pass
def _get_row(self):
p... | 11 | 2 | 27 | 4 | 20 | 3 | 3 | 0.16 | 1 | 13 | 0 | 0 | 9 | 14 | 9 | 9 | 255 | 43 | 183 | 79 | 165 | 29 | 143 | 71 | 133 | 11 | 1 | 3 | 31 |
7,598 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/sas/sasreader.py | pandas.io.sas.sasreader.SASReader | from typing import TYPE_CHECKING, Self, overload
from collections.abc import Iterator
from abc import ABC, abstractmethod
class SASReader(Iterator['DataFrame'], ABC):
"""
Abstract class for XportReader and SAS7BDATReader.
"""
@abstractmethod
def read(self, nrows: int | None=None) -> DataFrame:
... |
class SASReader(Iterator['DataFrame'], ABC):
'''
Abstract class for XportReader and SAS7BDATReader.
'''
@abstractmethod
def read(self, nrows: int | None=None) -> DataFrame:
pass
@abstractmethod
def close(self) -> None:
pass
def __enter__(self) -> Self:
pass
... | 7 | 1 | 3 | 0 | 3 | 0 | 1 | 0.21 | 2 | 2 | 0 | 0 | 4 | 0 | 4 | 29 | 21 | 4 | 14 | 12 | 4 | 3 | 9 | 5 | 4 | 1 | 5 | 0 | 4 |
7,599 | pandas-dev/pandas | pandas-dev_pandas/pandas/io/sql.py | pandas.io.sql.ADBCDatabase | from pandas.compat._optional import import_optional_dependency
from pandas.core.common import maybe_make_list
from pandas.core.api import DataFrame, Series
from typing import TYPE_CHECKING, Any, Literal, Self, cast, overload
from contextlib import ExitStack, contextmanager
from pandas.io._util import arrow_table_to_pan... |
class ADBCDatabase(PandasSQL):
'''
This class enables conversion between DataFrame and SQL databases
using ADBC to handle DataBase abstraction.
Parameters
----------
con : adbc_driver_manager.dbapi.Connection
'''
def __init__(self, con) -> None:
pass
@contextmanager
def... | 11 | 4 | 38 | 3 | 21 | 14 | 5 | 0.67 | 1 | 11 | 0 | 0 | 8 | 1 | 8 | 43 | 327 | 37 | 174 | 79 | 123 | 117 | 104 | 31 | 94 | 12 | 5 | 4 | 38 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.