Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'fnid', 'admin_2', 'planting_year', 'qc_flag'}) and 2 missing columns ({'season_length_months', 'log_area'}).
This happened while the csv dataset builder was generating data using
hf://datasets/CircuitNotion/africa-crop-yield/hvstat_africa_data_v1.0.csv (at revision 7bd9acbe356c8ba9c9152b39e6a5134d4dad0d35), ['hf://datasets/CircuitNotion/africa-crop-yield@7bd9acbe356c8ba9c9152b39e6a5134d4dad0d35/crop_yield_ml.csv', 'hf://datasets/CircuitNotion/africa-crop-yield@7bd9acbe356c8ba9c9152b39e6a5134d4dad0d35/hvstat_africa_data_v1.0.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1837, in _prepare_split_single
writer.write_table(table)
~~~~~~~~~~~~~~~~~~^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 765, in write_table
self._write_table(pa_table, writer_batch_size=writer_batch_size)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/arrow_writer.py", line 773, in _write_table
pa_table = table_cast(pa_table, self._schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2369, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2297, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
fnid: string
country: string
country_code: string
admin_1: string
admin_2: string
product: string
season_name: string
planting_year: int64
planting_month: int64
harvest_year: int64
harvest_month: int64
crop_production_system: string
qc_flag: int64
area: double
production: double
yield: double
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 2179
to
{'country': Value('string'), 'admin_1': Value('string'), 'product': Value('string'), 'season_name': Value('string'), 'crop_production_system': Value('string'), 'planting_month': Value('int64'), 'harvest_month': Value('int64'), 'harvest_year': Value('int64'), 'season_length_months': Value('float64'), 'log_area': Value('float64'), 'yield': Value('float64'), 'country_code': Value('string'), 'area': Value('float64'), 'production': Value('float64')}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1369, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 948, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1683, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1839, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
...<4 lines>...
)
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 4 new columns ({'fnid', 'admin_2', 'planting_year', 'qc_flag'}) and 2 missing columns ({'season_length_months', 'log_area'}).
This happened while the csv dataset builder was generating data using
hf://datasets/CircuitNotion/africa-crop-yield/hvstat_africa_data_v1.0.csv (at revision 7bd9acbe356c8ba9c9152b39e6a5134d4dad0d35), ['hf://datasets/CircuitNotion/africa-crop-yield@7bd9acbe356c8ba9c9152b39e6a5134d4dad0d35/crop_yield_ml.csv', 'hf://datasets/CircuitNotion/africa-crop-yield@7bd9acbe356c8ba9c9152b39e6a5134d4dad0d35/hvstat_africa_data_v1.0.csv']
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
country string | admin_1 string | product string | season_name string | crop_production_system string | planting_month int64 | harvest_month int64 | harvest_year int64 | season_length_months float64 | log_area float64 | yield float64 | country_code string | area float64 | production float64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Angola | Bengo | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,006 | 6 | 9.145909 | 0.25792 | AO | 9,375 | 2,418 |
Angola | Bengo | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,007 | 6 | 9.489562 | 0.2 | AO | 13,220 | 2,644 |
Angola | Bengo | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,008 | 6 | 8.892337 | 0.349966 | AO | 7,275 | 2,546 |
Angola | Bengo | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,009 | 6 | 8.841014 | 0.299957 | AO | 6,911 | 2,073 |
Angola | Bengo | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,015 | 6 | 9.095042 | 0.374074 | AO | 8,910 | 3,333 |
Angola | Bengo | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,016 | 6 | 9.095042 | 0.374074 | AO | 8,910 | 3,333 |
Angola | Bengo | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,017 | 6 | 9.050618 | 0.37957 | AO | 8,522.8 | 3,235 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 1,997 | 6 | 9.680406 | 3.5 | AO | 16,000 | 56,000 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 1,998 | 6 | 10.032364 | 6.5 | AO | 22,750 | 147,875 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 1,999 | 6 | 9.935325 | 6 | AO | 20,646 | 123,876 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,000 | 6 | 9.999025 | 9 | AO | 22,004 | 198,036 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,006 | 6 | 10.686293 | 12.000114 | AO | 43,751 | 525,017 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,007 | 6 | 10.919298 | 9.699969 | AO | 55,231 | 535,739 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,008 | 6 | 10.294042 | 15.699915 | AO | 29,555 | 464,011 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,009 | 6 | 10.315067 | 16.000232 | AO | 30,183 | 482,935 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,015 | 6 | 10.572163 | 6.625436 | AO | 39,032 | 258,604 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,016 | 6 | 10.572163 | 6.625436 | AO | 39,032 | 258,604 |
Angola | Bengo | Cassava | Main | All (PS) | 10 | 4 | 2,017 | 6 | 10.619015 | 5.954093 | AO | 40,904.3 | 243,548 |
Angola | Bengo | Groundnuts (In Shell) | Main | All (PS) | 10 | 4 | 2,006 | 6 | 8.270525 | 0.316436 | AO | 3,906 | 1,236 |
Angola | Bengo | Groundnuts (In Shell) | Main | All (PS) | 10 | 4 | 2,008 | 6 | 8.317033 | 0.400049 | AO | 4,092 | 1,637 |
Angola | Bengo | Groundnuts (In Shell) | Main | All (PS) | 10 | 4 | 2,009 | 6 | 7.7012 | 0.3 | AO | 2,210 | 663 |
Angola | Bengo | Groundnuts (In Shell) | Main | All (PS) | 10 | 4 | 2,015 | 6 | 9.640173 | 0.888932 | AO | 15,369 | 13,662 |
Angola | Bengo | Groundnuts (In Shell) | Main | All (PS) | 10 | 4 | 2,016 | 6 | 9.640173 | 0.888932 | AO | 15,369 | 13,662 |
Angola | Bengo | Groundnuts (In Shell) | Main | All (PS) | 10 | 4 | 2,017 | 6 | 9.548882 | 0.2927 | AO | 14,028 | 4,106 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 1,997 | 6 | 9.305741 | 0.61 | AO | 11,000 | 6,710 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 1,998 | 6 | 9.546884 | 0.7 | AO | 14,000 | 9,800 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 1,999 | 6 | 9.124456 | 0.899956 | AO | 9,176 | 8,258 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,000 | 6 | 9.21064 | 1.19996 | AO | 10,002 | 12,002 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,001 | 6 | 8.759198 | 0.600031 | AO | 6,368 | 3,821 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,002 | 6 | 8.731013 | 0.649976 | AO | 6,191 | 4,024 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,003 | 6 | 8.964312 | 0.600026 | AO | 7,818 | 4,691 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,004 | 6 | 9.340579 | 0.749956 | AO | 11,390 | 8,542 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,005 | 6 | 8.954932 | 0.499935 | AO | 7,745 | 3,872 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,006 | 6 | 8.963672 | 0.339946 | AO | 7,813 | 2,656 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,007 | 6 | 8.800566 | 0.299985 | AO | 6,637 | 1,991 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,008 | 6 | 8.517793 | 0.69992 | AO | 5,002 | 3,501 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,009 | 6 | 8.030084 | 0.589059 | AO | 3,071 | 1,809 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,010 | 6 | 9.684647 | 0.529375 | AO | 16,068 | 8,506 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,011 | 6 | 9.826714 | 0.595756 | AO | 18,521 | 11,034 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,012 | 6 | 9.924955 | 0.213772 | AO | 20,433 | 4,368 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,013 | 6 | 9.946643 | 0.622528 | AO | 20,881 | 12,999 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,014 | 6 | 9.948652 | 0.648569 | AO | 20,923 | 13,570 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,015 | 6 | 10.111274 | 0.547973 | AO | 24,618 | 13,490 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,016 | 6 | 10.111274 | 0.547973 | AO | 24,618 | 13,490 |
Angola | Bengo | Maize | Main | All (PS) | 10 | 4 | 2,017 | 6 | 10.304503 | 0.590408 | AO | 29,865.8 | 17,633 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,001 | 6 | 6.054439 | 4.995294 | AO | 425 | 2,123 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,002 | 6 | 6.025866 | 2.997579 | AO | 413 | 1,238 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,005 | 6 | 5.451038 | 2.00431 | AO | 232 | 465 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,008 | 6 | 7.911691 | 6.330279 | AO | 2,728 | 17,269 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,009 | 6 | 7.911691 | 6.000367 | AO | 2,728 | 16,369 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,010 | 6 | 7.926242 | 6.009032 | AO | 2,768 | 16,633 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,011 | 6 | 7.928766 | 6.359279 | AO | 2,775 | 17,647 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,012 | 6 | 7.851272 | 5.321262 | AO | 2,568 | 13,665 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,013 | 6 | 7.861342 | 5.35852 | AO | 2,594 | 13,900 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,014 | 6 | 7.866722 | 5.402991 | AO | 2,608 | 14,091 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,015 | 6 | 6.97073 | 3.587406 | AO | 1,064 | 3,817 |
Angola | Bengo | Potato | Main | All (PS) | 10 | 4 | 2,016 | 6 | 6.97073 | 3.587406 | AO | 1,064 | 3,817 |
Angola | Bengo | Sorghum | Main | All (PS) | 10 | 4 | 2,009 | 6 | 4.727388 | 0.303571 | AO | 112 | 34 |
Angola | Bengo | Sorghum | Main | All (PS) | 10 | 4 | 2,010 | 6 | 4.795791 | 0.425 | AO | 120 | 51 |
Angola | Bengo | Sorghum | Main | All (PS) | 10 | 4 | 2,011 | 6 | 5.056246 | 0.442308 | AO | 156 | 69 |
Angola | Bengo | Sorghum | Main | All (PS) | 10 | 4 | 2,012 | 6 | 6.726233 | 0.086435 | AO | 833 | 72 |
Angola | Bengo | Sorghum | Main | All (PS) | 10 | 4 | 2,013 | 6 | 6.22059 | 0.276892 | AO | 502 | 139 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,001 | 6 | 8.353733 | 4.000236 | AO | 4,245 | 16,981 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,002 | 6 | 8.325548 | 4.500363 | AO | 4,127 | 18,573 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,003 | 6 | 8.558911 | 4 | AO | 5,212 | 20,848 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,004 | 6 | 8.578476 | 4 | AO | 5,315 | 21,260 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,005 | 6 | 8.59822 | 5.000369 | AO | 5,421 | 27,107 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,006 | 6 | 8.662505 | 5.000346 | AO | 5,781 | 28,907 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,007 | 6 | 8.540519 | 5.799492 | AO | 5,117 | 29,676 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,008 | 6 | 8.317033 | 7.860459 | AO | 4,092 | 32,165 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,009 | 6 | 8.319717 | 7.999513 | AO | 4,103 | 32,822 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,010 | 6 | 9.371183 | 7.99983 | AO | 11,744 | 93,950 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,011 | 6 | 9.375346 | 7.315611 | AO | 11,793 | 86,273 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,012 | 6 | 9.358415 | 3.779388 | AO | 11,595 | 43,822 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,013 | 6 | 9.368198 | 8.150397 | AO | 11,709 | 95,433 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,014 | 6 | 9.396488 | 12.794521 | AO | 12,045 | 154,110 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,015 | 6 | 9.277532 | 12.865158 | AO | 10,694 | 137,580 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,016 | 6 | 9.277532 | 12.865158 | AO | 10,694 | 137,580 |
Angola | Bengo | Sweet Potatoes | Main | All (PS) | 10 | 4 | 2,017 | 6 | 9.492613 | 9.883865 | AO | 13,260.4 | 131,064 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,001 | 6 | 9.880372 | 0.350015 | AO | 19,542 | 6,840 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,002 | 6 | 10.095017 | 0.349986 | AO | 24,221 | 8,477 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,003 | 6 | 8.826147 | 0.139962 | AO | 6,809 | 953 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,004 | 6 | 9.185228 | 0.250026 | AO | 9,751 | 2,438 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,005 | 6 | 9.728122 | 0.300024 | AO | 16,782 | 5,035 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,006 | 6 | 9.306559 | 0.073122 | AO | 11,009 | 805 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,007 | 6 | 7.686621 | 0.399908 | AO | 2,178 | 871 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,008 | 6 | 10.465728 | 0.299991 | AO | 35,091 | 10,527 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,009 | 6 | 11.982316 | 0.299998 | AO | 159,901 | 47,970 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,010 | 6 | 12.004189 | 0.302777 | AO | 163,437 | 49,485 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,011 | 6 | 12.058958 | 0.352941 | AO | 172,638 | 60,931 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,012 | 6 | 12.09866 | 0.105172 | AO | 179,630 | 18,892 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,013 | 6 | 12.172702 | 0.317978 | AO | 193,435 | 61,508 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,014 | 6 | 12.17567 | 0.398696 | AO | 194,010 | 77,351 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,015 | 6 | 10.539323 | 0.483678 | AO | 37,771 | 18,269 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,016 | 6 | 10.539323 | 0.483678 | AO | 37,771 | 18,269 |
Angola | Benguela | Beans (mixed) | Main | All (PS) | 10 | 4 | 2,017 | 6 | 10.567409 | 0.460706 | AO | 38,846.9 | 17,897 |
Angola | Benguela | Cassava | Main | All (PS) | 10 | 4 | 1,997 | 6 | 10.126671 | 4 | AO | 25,000 | 100,000 |
Angola | Benguela | Cassava | Main | All (PS) | 10 | 4 | 1,998 | 6 | 10.126671 | 6 | AO | 25,000 | 150,000 |
Angola | Benguela | Cassava | Main | All (PS) | 10 | 4 | 1,999 | 6 | 9.29716 | 5 | AO | 10,906 | 54,530 |
Angola | Benguela | Cassava | Main | All (PS) | 10 | 4 | 2,000 | 6 | 9.307013 | 5 | AO | 11,014 | 55,070 |
End of preview.
Africa Crop Yield Dataset
ML-ready crop yield table derived from HarvestStat Africa (FEWS NET / FAO harmonized subnational statistics).
Files
hvstat_africa_data_v1.0.csv— original HarvestStat public extractcrop_yield_ml.csv— cleaned/feature-engineered table used for training
Citation
Lee, D. et al. HarvestStat Africa – Harmonized Subnational Crop Statistics for Sub-Saharan Africa. Scientific Data (2025). https://doi.org/10.5061/dryad.vq83bk42w
- Downloads last month
- 27