Coder Social home page Coder Social logo

chitralverma / scala-polars Goto Github PK

View Code? Open in Web Editor NEW
57.0 6.0 4.0 4.04 MB

Polars for Scala & Java projects!

Home Page: https://chitralverma.github.io/scala-polars/

License: Apache License 2.0

Scala 53.59% Rust 40.44% Java 5.72% HTML 0.25%
arrow big-data dataframe dataframe-library java jni polars rust scala

scala-polars's Introduction

Hi there πŸ‘‹

scala-polars's People

Contributors

chitralverma avatar scala-steward avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

scala-polars's Issues

top_k descending flag reversed

//> using dep "org.polars::scala-polars:0.1.0-SNAPSHOT"

import org.polars.scala.polars.api.{DataFrame, Series}

val sdf = DataFrame.fromSeries(Series.ofInt("i32_col", Array[Int](1, 2, 3, 4, 5, 6, 7, 8, 9, 10)))

val tk = sdf.top_k(4, "i32_col", descending = true, nullLast = true, maintainOrder = false)
tk.show()

val sk = sdf.sort("i32_col", descending = true, nullLast = true, maintainOrder = false).head(4)
sk.show()
$ scala-cli topkbug.sc
Compiling project (Scala 3.4.1, JVM (21))
Compiled project (Scala 3.4.1, JVM (21))
shape: (4, 1)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ i32_col β”‚
β”‚ ---     β”‚
β”‚ i32     β”‚
β•žβ•β•β•β•β•β•β•β•β•β•‘
β”‚ 1       β”‚
β”‚ 2       β”‚
β”‚ 3       β”‚
β”‚ 4       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
shape: (4, 1)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ i32_col β”‚
β”‚ ---     β”‚
β”‚ i32     β”‚
β•žβ•β•β•β•β•β•β•β•β•β•‘
β”‚ 10      β”‚
β”‚ 9       β”‚
β”‚ 8       β”‚
β”‚ 7       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

I've been digging through the code and I don't see the problem offhand. Will keep looking.

Reading parquet from s3

Hi, Thank you on this awesome work @chitralverma !
I am trying to read from s3 in scala . I can see that writing is pretty simple as you added utility function to pass options in write_utils.rs

write.options(
        Map(
          "aws_default_region" -> "us‑east‑2",
          "aws_access_key_id" -> "ABC",
          "aws_secret_access_key" -> "XYZ"
        )

I am trying to do the same reading into a df, passing a s3 path to Polars.scan obviously throws

val df = Polars.parquet.scan("s3://test1/myfile.zstd.parquet")

Configuration 'aws' must be provided in order to use s3 cloud urls."))

Is there something I need tweak in the config to be able to read directly from s3 ? Maybe we need a read_utils.rs . I would be able to contribute, if you have some guidance :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.