How to use the traittypes.traittypes.Series function in traittypes

To help you get started, we’ve selected a few traittypes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jupyter-widgets / traittypes / traittypes / traittypes.py View on Github external
def __init__(self, default_value=Empty, allow_none=False, dtype=None, **kwargs):
        if 'klass' not in kwargs and self.klass is None:
            import pandas as pd
            kwargs['klass'] = pd.Series
        super(Series, self).__init__(
            default_value=default_value, allow_none=allow_none, dtype=dtype, **kwargs)
        self.dtype = dtype