Beispiel #1
0
    _use_inf_as_na(key)


with cf.config_prefix("mode"):
    cf.register_option("use_inf_as_na",
                       False,
                       use_inf_as_na_doc,
                       cb=use_inf_as_na_cb)
    cf.register_option("use_inf_as_null",
                       False,
                       use_inf_as_null_doc,
                       cb=use_inf_as_na_cb)

cf.deprecate_option("mode.use_inf_as_null",
                    msg=use_inf_as_null_doc,
                    rkey="mode.use_inf_as_na")

# user warnings
chained_assignment = """
: string
    Raise an exception, warn, or no action if trying to use chained assignment,
    The default is warn
"""

with cf.config_prefix("mode"):
    cf.register_option(
        "chained_assignment",
        "warn",
        chained_assignment,
        validator=is_one_of_factory([None, "warn", "raise"]),
Beispiel #2
0
    _use_inf_as_na(key)


with cf.config_prefix("mode"):
    cf.register_option("use_inf_as_na",
                       False,
                       use_inf_as_na_doc,
                       cb=use_inf_as_na_cb)
    cf.register_option("use_inf_as_null",
                       False,
                       use_inf_as_null_doc,
                       cb=use_inf_as_na_cb)

cf.deprecate_option("mode.use_inf_as_null",
                    msg=use_inf_as_null_doc,
                    rkey="mode.use_inf_as_na")

data_manager_doc = """
: string
    Internal data manager type; can be "block" or "array". Defaults to "block",
    unless overridden by the 'PANDAS_DATA_MANAGER' environment variable (needs
    to be set before pandas is imported).
"""

with cf.config_prefix("mode"):
    cf.register_option(
        "data_manager",
        # Get the default from an environment variable, if set, otherwise defaults
        # to "block". This environment variable can be set for testing.
        os.environ.get("PANDAS_DATA_MANAGER", "block"),
Beispiel #3
0
    cf.register_option('latex.multicolumn_format', 'l', pc_latex_multicolumn,
                       validator=is_text)
    cf.register_option('latex.multirow', False, pc_latex_multirow,
                       validator=is_bool)
    cf.register_option('html.table_schema', False, pc_table_schema_doc,
                       validator=is_bool, cb=table_schema_cb)
    cf.register_option('html.border', 1, pc_html_border_doc,
                       validator=is_int)
    cf.register_option('html.use_mathjax', True, pc_html_use_mathjax_doc,
                       validator=is_bool)

with cf.config_prefix('html'):
    cf.register_option('border', 1, pc_html_border_doc,
                       validator=is_int)

cf.deprecate_option('html.border', msg=pc_html_border_deprecation_warning,
                    rkey='display.html.border')


tc_sim_interactive_doc = """
: boolean
    Whether to simulate interactive mode for purposes of testing
"""

with cf.config_prefix('mode'):
    cf.register_option('sim_interactive', False, tc_sim_interactive_doc)

use_inf_as_null_doc = """
: boolean
    use_inf_as_null had been deprecated and will be removed in a future
    version. Use `use_inf_as_na` instead.
"""
Beispiel #4
0
    from pandas.core.dtypes.missing import _use_inf_as_na
    _use_inf_as_na(key)


with cf.config_prefix('mode'):
    cf.register_option('use_inf_as_na',
                       False,
                       use_inf_as_na_doc,
                       cb=use_inf_as_na_cb)
    cf.register_option('use_inf_as_null',
                       False,
                       use_inf_as_null_doc,
                       cb=use_inf_as_na_cb)

cf.deprecate_option('mode.use_inf_as_null',
                    msg=use_inf_as_null_doc,
                    rkey='mode.use_inf_as_na')

# user warnings
chained_assignment = """
: string
    Raise an exception, warn, or no action if trying to use chained assignment,
    The default is warn
"""

with cf.config_prefix('mode'):
    cf.register_option('chained_assignment',
                       'warn',
                       chained_assignment,
                       validator=is_one_of_factory([None, 'warn', 'raise']))
Beispiel #5
0
    cf.register_option('html.table_schema',
                       False,
                       pc_table_schema_doc,
                       validator=is_bool,
                       cb=table_schema_cb)
    cf.register_option('html.border', 1, pc_html_border_doc, validator=is_int)
    cf.register_option('html.use_mathjax',
                       True,
                       pc_html_use_mathjax_doc,
                       validator=is_bool)

with cf.config_prefix('html'):
    cf.register_option('border', 1, pc_html_border_doc, validator=is_int)

cf.deprecate_option('html.border',
                    msg=pc_html_border_deprecation_warning,
                    rkey='display.html.border')

tc_sim_interactive_doc = """
: boolean
    Whether to simulate interactive mode for purposes of testing
"""

with cf.config_prefix('mode'):
    cf.register_option('sim_interactive', False, tc_sim_interactive_doc)

use_inf_as_null_doc = """
: boolean
    use_inf_as_null had been deprecated and will be removed in a future
    version. Use `use_inf_as_na` instead.
"""