Dataframe 0.15 Help

Get started with Kotlin DataFrame on Jupyter Notebook

Jupyter Notebook

You can use the Kotlin DataFrame library in Jupyter Notebook and in Jupyter Lab. To start, install the latest version of Kotlin kernel and start your favorite Jupyter client from the command line, for example:

jupyter notebook

In the notebook, you only have to write a single line to start using the Kotlin DataFrame library:

%use dataframe

In this case, the version bundled with the kernel will be used. If you want always to use the latest version, add another magic before %use dataframe:

%useLatestDescriptors %use dataframe

If you want to use a specific version of the Kotlin DataFrame library, you can specify it in brackets:

%use dataframe(0.15.0)

After loading, all essential types will be already imported, so you can start using the Kotlin DataFrame library. Enjoy!

val df = DataFrame.read("https://raw.githubusercontent.com/Kotlin/dataframe/master/data/jetbrains_repositories.csv") df // the last expression in the cell is displayed

When the previous cell with variable declaration is executed, DataFrame provides a data schema API based on data:

df.filter { stargazers_count > 50 }
Last modified: 09 December 2024