getdaft (Superseded by Daft)
The `getdaft` package served as an initial entry point for the Daft distributed dataframe library. As of its `0.5.0` version, it acts primarily as a wrapper that installs an older, specific version of the `daft` package (currently `daft==0.5.0`). Users should directly install and use the actively developed `daft` library instead, as `getdaft` is no longer maintained.
Common errors
-
ModuleNotFoundError: No module named 'getdaft'
cause You are trying to import from `getdaft`, but even if `getdaft` is installed, its components are exposed under the `daft` namespace.fixChange your import statements from `import getdaft` or `from getdaft import ...` to `import daft` or `from daft import ...`. -
AttributeError: module 'daft' has no attribute 'some_new_feature'
cause You have `getdaft` installed, which provides an older version of the `daft` library (e.g., `daft==0.5.0`). The feature you are trying to use was introduced in a newer version of `daft`.fixUninstall `getdaft` and any existing `daft` installations, then install the latest `daft` directly: `pip uninstall getdaft daft` followed by `pip install daft`.
Warnings
- breaking The `getdaft` package is no longer actively maintained and has been effectively superseded by the `daft` package. New development, features, and bug fixes are exclusively applied to `daft`.
- gotcha Installing `getdaft` (e.g., `0.5.0`) will install `daft==0.5.0`, which is a specific, older version of the `daft` library. This can lead to unexpected behavior or missing features if your code expects a newer `daft` version.
- gotcha Despite `getdaft` being the installed package name, all core functionalities and classes are exposed under the `daft` namespace (e.g., `from daft import DataFrame`). Attempting to import from `getdaft` will fail.
Install
-
pip install getdaft -
pip install daft
Imports
- DataFrame
from getdaft import DataFrame
from daft import DataFrame
- Daft
import getdaft
import daft
Quickstart
import daft
import pandas as pd
# IMPORTANT: Use 'pip install daft' directly.
# 'getdaft' installs an old version of 'daft' and should not be used.
# Create a sample Pandas DataFrame
pd_df = pd.DataFrame({
"name": ["Alice", "Bob", "Charlie"],
"age": [25, 30, 35]
})
# Convert to Daft DataFrame
daft_df = daft.from_pandas(pd_df)
# Perform a simple operation
result_df = daft_df.select(
dafa_df["name"],
daft_df["age"] + 1 # Increment age
)
# Collect the result to a Pandas DataFrame for display
print("Resulting Daft DataFrame (collected to Pandas):")
print(result_df.collect().to_pandas())