Kotlin / Kotlin/dataframe

readExcel: stringColumns argument fails to match columns that are automatically renamed due to duplication.

Open
#1,791 3 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

Library Version: 1.0.0-Beta4

When reading an Excel file (.xlsx) that contains duplicate column names (e.g., two columns named "label"), the readExcel function automatically renames the duplicates (e.g., label and label1) to ensure uniqueness.

I found that stringColumns is ineffective for renamed duplicates.

Inputting the original name (label) only affects the first instance.

Inputting the inferred renamed name (label_1) is ignored by the loader.

This leaves no declarative way to handle duplicate columns as strings during the initial load phase.

Contributor guide

Open the contributing guide

Research direction

Start at the readExcel entry point and trace how stringColumns names are matched after duplicate columns are renamed. Reproduce the case with two label columns in an .xlsx file, then verify that stringColumns can declaratively mark both resulting columns as strings during the initial load.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.