Skip to content

read(Csv/Tsv/Delim)(Str) parameter mismatch #1141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Jolanrensen opened this issue Apr 22, 2025 · 0 comments · Fixed by #1142
Closed

read(Csv/Tsv/Delim)(Str) parameter mismatch #1141

Jolanrensen opened this issue Apr 22, 2025 · 0 comments · Fixed by #1142
Assignees
Labels
csv CSV / delim related issues enhancement New feature or request

Comments

@Jolanrensen
Copy link
Collaborator

In the current situation, this is what the family of functions look like:

public fun DataFrame.Companion.readDelimStr(
    text: String,
    delimiter: Char = DELIM_DELIMITER,
    header: List<String> = HEADER,
    hasFixedWidthColumns: Boolean = HAS_FIXED_WIDTH_COLUMNS,
    fixedColumnWidths: List<Int> = FIXED_COLUMN_WIDTHS,
    colTypes: Map<String, ColType> = COL_TYPES,
    skipLines: Long = SKIP_LINES,
    readLines: Long? = READ_LINES,
    parserOptions: ParserOptions? = PARSER_OPTIONS,
    ignoreEmptyLines: Boolean = IGNORE_EMPTY_LINES,
    allowMissingColumns: Boolean = ALLOW_MISSING_COLUMNS,
    ignoreExcessColumns: Boolean = IGNORE_EXCESS_COLUMNS,
    quote: Char = QUOTE,
    ignoreSurroundingSpaces: Boolean = IGNORE_SURROUNDING_SPACES,
    trimInsideQuoted: Boolean = TRIM_INSIDE_QUOTED,
    parseParallel: Boolean = PARSE_PARALLEL,
): DataFrame<*>
public fun DataFrame.Companion.readDelim(
    path: Path,
    delimiter: Char = DELIM_DELIMITER,
    header: List<String> = HEADER,
    hasFixedWidthColumns: Boolean = HAS_FIXED_WIDTH_COLUMNS,
    fixedColumnWidths: List<Int> = FIXED_COLUMN_WIDTHS,
    compression: Compression<*> = Compression.of(path), // not present for readDelimStr
    colTypes: Map<String, ColType> = COL_TYPES,
    skipLines: Long = SKIP_LINES,
    readLines: Long? = READ_LINES,
    parserOptions: ParserOptions? = PARSER_OPTIONS,
    ignoreEmptyLines: Boolean = IGNORE_EMPTY_LINES,
    allowMissingColumns: Boolean = ALLOW_MISSING_COLUMNS,
    ignoreExcessColumns: Boolean = IGNORE_EXCESS_COLUMNS,
    quote: Char = QUOTE,
    ignoreSurroundingSpaces: Boolean = IGNORE_SURROUNDING_SPACES,
    trimInsideQuoted: Boolean = TRIM_INSIDE_QUOTED,
    parseParallel: Boolean = PARSE_PARALLEL,
): DataFrame<*> 

However, you can see that compression is somewhere in the middle. Most likely because I removed it for the str cases. It better be moved towards the end so users can switch between the -str overloads and the normal ones more easily.

@Jolanrensen Jolanrensen added csv CSV / delim related issues enhancement New feature or request labels Apr 22, 2025
@Jolanrensen Jolanrensen added this to the 1.0.0-Beta1 (0.16) milestone Apr 22, 2025
@Jolanrensen Jolanrensen self-assigned this Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
csv CSV / delim related issues enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant