pandas/_testing/contexts.py
def with_csv_dialect(name, **kwargs):
    """
    Context manager to temporarily register a CSV dialect for parsing CSV.

    Parameters
    ----------
    name : str
        The name of the dialect.
    kwargs : mapping
        The parameters for the dialect.

    Raises
    ------
    ValueError : the name of the dialect conflicts with a builtin one.

    See Also
    --------
    csv : Python's CSV library.
    """
    import csv

    _BUILTIN_DIALECTS = {"excel", "excel-tab", "unix"}

    if name in _BUILTIN_DIALECTS:
        raise ValueError("Cannot override builtin dialect.")

    csv.register_dialect(name, **kwargs)
    yield
    csv.unregister_dialect(name)

    Context manager to temporarily register a CSV dialect for parsing CSV.

    Parameters
    ----------
    name : str
        The name of the dialect.
    kwargs : mapping
        The parameters for the dialect.

    Raises
    ------
    ValueError : the name of the dialect conflicts with a builtin one.

    See Also
    --------
    csv : Python's CSV library.
    
Context manager to temporarily register a CSV dialect for parsing CSV.
Parameters

name : str
The name of the dialect.
kwargs : mapping
The parameters for the dialect.

Raises

ValueError : the name of the dialect conflicts with a builtin one.

See Also

csv : Python's CSV library.
Context manager to temporarily register a CSV dialect for parsing CSV . Parameters name : str The name of the dialect . kwargs : mapping The parameters for the dialect . Raises ValueError : the name of the dialect conflicts with a builtin one . See Also csv : Python ' s CSV library .
def with_csv_dialect(name, **kwargs):
    import csv
    _BUILTIN_DIALECTS = {"excel", "excel-tab", "unix"}
    if name in _BUILTIN_DIALECTS:
        raise ValueError("Cannot override builtin dialect.")
    csv.register_dialect(name, **kwargs)
    yield
    csv.unregister_dialect(name)
def with_csv_dialect ( name , ** kwargs ) : import csv _BUILTIN_DIALECTS = { "excel" , "excel-tab" , "unix" } if name in _BUILTIN_DIALECTS : raise ValueError ( "Cannot override builtin dialect." ) csv . register_dialect ( name , ** kwargs ) yield csv . unregister_dialect ( name )
Context manager to temporarily register a CSV dialect for parsing CSV.
Context manager to temporarily register a CSV dialect for parsing CSV .
"""
    Context manager to temporarily register a CSV dialect for parsing CSV.

    Parameters
    ----------
    name : str
        The name of the dialect.
    kwargs : mapping
        The parameters for the dialect.

    Raises
    ------
    ValueError : the name of the dialect conflicts with a builtin one.

    See Also
    --------
    csv : Python's CSV library.
    """
name