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 f2ce907 commit f08114cCopy full SHA for f08114c
1 file changed
python-package/xgboost/data.py
@@ -658,7 +658,11 @@ def _transform_pandas_df(
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.")
+ duplicates = data.columns[data.columns.duplicated()].unique().tolist()
662
+ raise ValueError(
663
+ "Duplicate column names are not supported. "
664
+ f"Duplicates found: {duplicates}"
665
+ )
666
667
feature_types, ref_categories = get_ref_categories(feature_types)
668
feature_names, feature_types = pandas_feature_info(
0 commit comments