Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python-package/xgboost/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,8 @@ def _transform_pandas_df(
) -> Tuple[PandasTransformed, Optional[FeatureNames], Optional[FeatureTypes]]:
if meta and len(data.columns) > 1 and meta not in _matrix_meta:
raise ValueError(f"DataFrame for {meta} cannot have multiple columns")
if data.columns.has_duplicates:
raise ValueError("Duplicate column names are not supported.")
Comment thread
trivialfis marked this conversation as resolved.
Outdated

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot apply changes based on this feedback


feature_types, ref_categories = get_ref_categories(feature_types)
feature_names, feature_types = pandas_feature_info(
Expand Down
Loading