Adopt `readParquet` method to read the whole directory in short and clear way
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
- 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
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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