Add "Migrating from Pandas" guide#1328
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a migration guide for Pandas users moving to Kotlin DataFrame and tidies up navigation and formatting.
- Introduces a new “Migrating from Pandas” guide
- Cleans up a formatting quirk in the Quickstart guide
- Updates the documentation tree to include the new guide
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/StardustDocs/topics/guides/quickstart.md | Merged two bullet lines into a single paragraph and added spacing |
| docs/StardustDocs/topics/guides/migratingFromPandas.md | Added the full migration guide from Pandas to Kotlin DataFrame |
| docs/StardustDocs/d.tree | Inserted the new guide into the site’s table of contents |
Comments suppressed due to low confidence (2)
docs/StardustDocs/topics/guides/migratingFromPandas.md:214
- [nitpick] Wrap technical terms and function names such as
advanced time indexingandresample()in backticks for inline code formatting to improve readability.
- Some Pandas features (like advanced time indexing, resample()) aren’t available yet.
docs/StardustDocs/topics/guides/migratingFromPandas.md:1
- [nitpick] Consider renaming the file to use kebab-case (e.g.,
migrating-from-pandas.md) to match the naming convention of other guide files.
# Migration Guide: Pandas to Kotlin DataFrame
| We recommend [starting with **Kotlin Notebook**](gettingStartedKotlinNotebook.md) for the best beginner experience — | ||
| everything works out of the box, | ||
| including interactivity and rich DataFrame and plots rendering. | ||
| everything works out of the box, including interactivity and rich DataFrame and plots rendering. |
There was a problem hiding this comment.
Remove the trailing whitespace at the end of this line to avoid unintended formatting or layout issues.
| everything works out of the box, including interactivity and rich DataFrame and plots rendering. | |
| everything works out of the box, including interactivity and rich DataFrame and plots rendering. |
|
@zaleslaw may be use tabs instead of subsequent paragraphs (like polars docs do)? Instead of ### Pandas (Matplotlib)
```python
df["profit"] = df.revenue - df.cost
pivot = df.pivot_table(values="profit", index="product", columns="year")
```
### Kotlin DataFrame (Kandy)
```kotlin
val pivot = df
.add("profit") { revenue - cost }
.pivot(product, year) { mean(profit) }
```add tabs: <tabs>
<tab title="Pandas (Matplotlib)">
```python
df["profit"] = df.revenue - df.cost
pivot = df.pivot_table(values="profit", index="product", columns="year")
```
</tab>
<tab title="Kotlin DataFrame (Kandy)">
```kotlin
val pivot = df
.add("profit") { revenue - cost }
.pivot(product, year) { mean(profit) }
```
</tab>
</tabs>in all such places. |
|
The guide is useful, but I would not merge it before validating the code snippets. A few examples currently look non-compilable against the current API:
Since the PR description says this should be shipped with validated Pandas / Kotlin DataFrame code, I’d suggest moving representative snippets into sample functions and referencing them with |
It's a draft, should be shipped with the validated Pandas / Kotlin DataFrame code