A lightweight C implementation inspired by Python's Pandas library for data manipulation and analysis.
Cuddle is a powerful C library designed to handle data frames and provide similar functionality to Python's Pandas. It offers efficient data structures and operations for working with structured data.
-
Data Frame Operations
- Create and manipulate tabular data
- Read/write CSV files
- Dynamic type inference
- Column-based storage
-
Basic Operations
df_head()- View first N rowsdf_tail()- View last N rowsdf_shape()- Get dimensionsdf_info()- Display structure infodf_describe()- Statistical summary
-
Data Manipulation
- Filtering rows
- Sorting data
- Type conversion
- Applying functions
- Group by operations
-
Memory Management
- Built-in garbage collector
- Safe memory handling
- Automatic cleanup
make # Build the library
make debug # Build with debug symbols#include "dataframe.h"
int main(void) {
// Read CSV file
dataframe_t *df = df_read_csv("data.csv", ",");
// Display first 5 rows
dataframe_t *head = df_head(df, 5);
df_dump(head);
// Get basic information
df_info(df);
// Clean up
df_free(df);
df_free(head);
return 0;
}df_read_csv()- Read data from CSV filedf_write_csv()- Write data to CSV file
df_filter()- Filter rows based on conditionsdf_sort()- Sort data by columndf_groupby()- Group data for aggregationdf_apply()- Apply function to columns
df_get_value()- Get single valuedf_get_values()- Get column valuesdf_dump()- Display data frame content
Feel free to contribute by:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request