semvec/pypi-packages huggingface dataset:
docdocgo 0.1.0
Insert pandas DataFrames as tables into Microsoft Word documents
Requires Python: >=3.9
Keywords: pandas, docx, word, tables, documents

# docdocgo

Insert pandas DataFrames as tables into Microsoft Word documents.

## Features

- **Simple API**: Just call `docdocgo(df, "document.docx")` to update Word documents
- **Marker Replacement**: Use markers like `{{QUARTERLY_NUMBERS}}` in your Word templates
- **Professional Styling**: Tables with dark blue headers and alternating row colors
- **Type Support**: Handles all pandas data types including NaN values
- **Performance Optimized**: Efficient table creation for large DataFrames

## Installation

```bash
uv add docdocgo
```

Or with pip:

```bash
pip install docdocgo
```

## Quick Start

```python
import pandas as pd
from docx import Document
import docdocgo

data = pd.DataFrame({
    "Quarter": ["Q1", "Q2", "Q3", "Q4"],
    "Revenue": [120000, 135000, 142000, 158000],
    "Profit": [25000, 32000, 28000, 41000],
})

doc = Document()
doc.add_heading("Quarterly Report", 0)
doc.add_paragraph("Here are the quarterly results:")
doc.add_paragraph("{{QUARTERLY_DATA}}")
doc.add_paragraph("Thank you for reviewing this report.")
doc.save("template.docx")

docdocgo.insert_table(data, "template.docx", "{{QUARTERLY_DATA}}", "result.docx")
```

This transforms your template document into a final report:

📄 **[template.docx](examples/template.docx)** → 📊 **[result.docx](examples/result.docx)**

From template with marker to professional report with formatted table

## API Reference

### `docdocgo(df, path, marker=None, output_path=None)`

Convenience function to insert DataFrame into Word document.

**Parameters:**

- `df` (pandas.DataFrame): DataFrame to insert
- `path` (str | Path): Path to Word document
- `marker` (str, optional): Marker to replace. If None, creates new document
- `output_path` (str | Path, optional): Output path. If None, overwrites input file

### `create_document_with_table(df, output_path)`

Create a new Word document with a DataFrame table.

**Parameters:**

- `df` (pandas.DataFrame): DataFrame to insert
- `output_path` (str | Path): Path for the new document

### `insert_table(df, docx_path, marker, output_path=None)`

Replace a marker in an existing Word document with a DataFrame table.

**Parameters:**

- `df` (pandas.DataFrame): DataFrame to insert
- `docx_path` (str | Path): Path to existing Word document
- `marker` (str): Marker string to replace
- `output_path` (str | Path, optional): Output path. If None, overwrites input document

## Development

Uses [just](https://just.systems/man/en/).

```bash
# Clone and setup
git clone <repository>
cd docdocgo
uv sync

# Run tests and examples
just test
```

## License

MIT License
ai4u 0.5.0
AI4U connect Godot and python applications compatible with gynasium
Requires Python: >=3.10

# AI4U - Artificial Inteligence For You

AI4U tool AI4U is a agent framework for modeling virtual reality and game environment. This repo we keep the reference implementation for Godot Game Engine.

The Godot version of the AI4U get advantage of the Godot architecture and facilitate agent specification by means of an agent abstraction. In Godot, AI4U provides a alternative approach to modeling Non-Player Characters (NPC). Although, developers can apply this tool in others situations, for example, the modeling environment for artificial intelligence experiments.

Agent abstraction defines an agent living in a environment and interacting with this environment by means of sensors and actuators. So, NPC specification is a kind of agent specification. Agent's components are: sensors, actuators, events, reward functions and brain. Sensors and actuators are the interface between agents and environments. A sensor provides data to an agent's brain, while actuators send actions from agent to environment. A brain is a script that proccessing sensors' data e made a decision (selects an action by time).

# Use ai4upy for Training
The Python side of the AI4U can be installed using local pip package. To install it, enter the directory pyplugin/ai4upy/ai4u and run the command:

    pip install ai4u

This command allows you to train and run an agent within a Godot scene.