Kotlin / Kotlin/dataframe

Adopt `readParquet` method to read the whole directory in short and clear way

Open
#1,810 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

API enhancement
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

  1. Often parquet dataset is a directory of files that should be read as one dataframe
    pandas:
df = pd.read_parquet("/home/nikita/Desktop/parquet")
print(df)

dataframe, no luck:

val df = DataFrame.readParquet("/home/nikita/Desktop/parquet")
df.print()

Exception in thread "main" java.lang.RuntimeException: Error creating dataset. Could not read schema from '/home/nikita/Desktop/parquet'. Is this a 'parquet' file?: Cannot open for reading: path '/home/nikita/Desktop/parquet' is a directory

We should scan provided directories for parquet files same as pandas

  1. Workaround is verbose too

Actual DataFrame code if i need to read list of files:
DataFrame.readParquet(*Path("").listDirectoryEntries().toTypedArray())

Expected:
DataFrame.readParquet(Path("").listDirectoryEntries())

We need Iterable overloads for reading methods

This entire https://ftp.ebi.ac.uk/pub/databases/opentargets/platform/25.03/output/ collection of datasets comes in such format

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the DataFrame.readParquet entry point and inspect how a single path is currently handled, along with the Path and Iterable call forms shown in the issue. Define completion as allowing a parquet directory or an Iterable of paths to be read without manually expanding the directory entries, while preserving the existing single-file behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.