Skip to content
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

Make it clear that dataframes are immutable #924

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/StardustDocs/topics/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ val df = DataFrame.readCSV("titanic.csv", delimiter = ';')

```kotlin
// filter rows
df.filter { survived && home.endsWith("NY") && age in 10..20 }
val someSurvivors = df.filter { survived && home.endsWith("NY") && age in 10..20 }

// add column
df.add("birthYear") { 1912 - age }
val withBirthYearColumen = df.add("birthYear") { 1912 - age }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo


// sort rows
df.sortByDesc { age }
val sortedByAge = df.sortByDesc { age }

// aggregate data
df.groupBy { pclass }.aggregate {
val aggregated = df.groupBy { pclass }.aggregate {
maxBy { age }.name into "oldest person"
count { survived } into "survived"
}
Expand Down Expand Up @@ -119,7 +119,7 @@ val dfClean = df
**Aggregate:**
```kotlin
// group by flight origin
dfClean.groupBy { From into "origin" }.aggregate {
val analysed = dfClean.groupBy { From into "origin" }.aggregate {
// we are in the context of single data group

// number of flights from origin
Expand Down
Loading