# Python and Arrow
source: https://docs.chalk.ai/docs/chalkdf/io/python-and-arrow

## Construct a DataFrame from Python values or an Arrow table.

For a small Python dataset, pass a dictionary of equally long columns to [`DataFrame`](/dataframe-docs#DataFrame). When another library already supplies an Arrow table, pass it to [`from_arrow`](/dataframe-docs#DataFrame.from_arrow). Specify Arrow types when values alone cannot establish the intended schema.

```python
import pyarrow as pa
from chalkdf import DataFrame

schema = pa.schema([("id", pa.string()), ("score", pa.float64())])
table = pa.table({"id": ["001", "002"], "score": [None, None]}, schema=schema)
DataFrame.from_arrow(table).to_arrow()
```

| id · `string` | score · `double` |
| ------------- | ---------------- |
| 001           | null             |
| 002           | null             |

Both scores are missing. The schema still gives `score` a floating-point type. The final call returns a PyArrow table that you can pass to another Arrow consumer.

See [`DataFrame.from_dict`](/dataframe-docs#DataFrame.from_dict), [`DataFrame.from_arrow`](/dataframe-docs#DataFrame.from_arrow), [`DataFrame.to_arrow`](/dataframe-docs#DataFrame.to_arrow).





