We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3284a0f commit f2ce907Copy full SHA for f2ce907
1 file changed
python-package/xgboost/data.py
@@ -657,6 +657,8 @@ def _transform_pandas_df(
657
) -> Tuple[PandasTransformed, Optional[FeatureNames], Optional[FeatureTypes]]:
658
if meta and len(data.columns) > 1 and meta not in _matrix_meta:
659
raise ValueError(f"DataFrame for {meta} cannot have multiple columns")
660
+ if data.columns.has_duplicates:
661
+ raise ValueError("Duplicate column names are not supported.")
662
663
feature_types, ref_categories = get_ref_categories(feature_types)
664
feature_names, feature_types = pandas_feature_info(
0 commit comments