Skip to main content

No project description provided

Project description

Tabular data processing for Continuous REPresentation

pytest

pip install git+https://github.com/eurobios-mews-labs/crep

This simple module aims at providing some function to tackle tabular data that have a continuous axis. In situations, this index can represent time, but this tool was originally developed to tackle rail way description.

This simple tools helps providing tools to represent a linear structure (cable, rail, beam, pipe) whose characteristics are piece-wize constant (of strongly heterogeneous length)

Basic usage

  • Merge function merge together two dataframe
import pandas as pd

from crep import merge


df_left = pd.DataFrame(
    dict(id=[2, 2, 2],
         t1=[0, 100, 120],
         t2=[100, 120, 130],
         data1=[0.2, 0.1, 0.5])
)
df_right = pd.DataFrame(
    dict(id=[2, 2, 2],
         t1=[0, 80, 100],
         t2=[70, 100, 140],
         data2=[0.1, 0.3, 0.2])
)

ret = merge(data_left=df_left,
            data_right=df_right,
            id_continuous=["t1", "t2"],
            id_discrete=["id"],
            how="outer")

Yield the following result

drawing

Acknowledgement

This implementation come from an SNCF DTIPG project and is developed and maintained by Eurobios Mews Labs and SNCF DTIPG.

drawing drawing

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crep-2024.1.1.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distribution

crep-2024.1.1-py3-none-any.whl (14.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page