You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow the Python bindings to accept pandas DataFrames directly as input to cpplink, so users can pass their data from Python without having to write intermediate files.
The Python layer should convert the DataFrame into the native cpplink data structures, with the core C++ implementation remaining independent of pandas.
Tasks
Define the Python API for passing one or more pandas DataFrames to cpplink.
Implement conversion from pandas DataFrame columns to the corresponding C++ column types.
Preserve column names and expose them to the cpplink schema.
Avoid unnecessary copies where practical.
Define behaviour for unsupported pandas dtypes.
Provide useful Python exceptions for invalid or incompatible DataFrames.
Add unit tests covering:
Different column types
Missing values
Empty DataFrames
Large DataFrames
Unsupported dtypes
Multiple DataFrames
Add Python examples demonstrating the API.
Document the conversion rules between pandas and cpplink types.
Design considerations
The binding should keep pandas-specific code at the Python/C++ interface. The cpplink core should operate on its existing native column/data structures and should not depend on pandas.
Investigate whether the conversion can use the pandas/NumPy buffer interfaces or other zero-copy mechanisms where appropriate, particularly for numerical columns, while keeping the API simple and robust.
Expected outcome
A Python user should be able to do something conceptually like:
Activity