piso
piso copied to clipboard
Pandas Interval Set Operations: providing methods for set operations, analytics, lookups and joins on pandas' Interval, IntervalArray and IntervalIndex
`piso/docs/user_guide/intervalsets.rst` Two typos in this doc Note that if a interval array . :class:`pandas.array.IntervalArray`
#### Is your feature request related to a problem? ``` import pandas as pd import piso piso.register_accessors() arr = pd.arrays.IntervalArray.from_tuples( [(1,5), (3,6), (2,4)], closed="both") arr.piso.intersection() ``` #### Describe the solution...
#### Describe the solution you'd like Add new top-level function into ndframe.py - piso.from_frame It allows fast creation of interval arrays from vector data in dataframes #### Additional context sig:...
#### Describe the solution you'd like Constructed from an interval array. See bottom of https://upload.wikimedia.org/wikipedia/commons/a/ac/Interval_graph.svg Use matplotlib. Can accept labels for the graph.
#### Describe the solution you'd like See top image in https://upload.wikimedia.org/wikipedia/commons/a/ac/Interval_graph.svg Use matplotlib. Labels should be able to be provided.
#### Describe the solution you'd like Use lru_cache. Convert interval arrays to tuples for hashing purposes. Should we have a method which turns caching on or off? #### Additional context...
sources: https://docs.python.org/3/library/typing.html https://mypy.readthedocs.io/en/stable/cheat_sheet_py3.html https://realpython.com/lessons/type-hinting/ https://github.com/staircase-dev/staircase/blob/master/staircase/_typing.py has been created for custom types (see https://github.com/pandas-dev/pandas/blob/master/pandas/_typing.py for inspiration)