Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Holger Brandl
    @holgerbrandl
    hi kplyr community! Feel welcome to post questions. :-)
    Jan Blankenhorn
    @jblankenhorn
    @holgerbrandl krangl looks really promising ... is it already production ready?I would like to use it in a rather small application ..
    Holger Brandl
    @holgerbrandl
    @jblankenhorn I’ve recently refactored the API to adopt more kotlin idoms (instead of just mimicking dplyr from R). I think it’s getting there. So sure, feel welcome to give it a try and file tickets as needed if you dislike certain bits or see room for more features.
    Michael
    @fiddleatwork
    Hello, I have a question about krangl, is anyone listening?
    Holger Brandl
    @holgerbrandl
    Hi Michael, sure go ahead.
    Michael
    @fiddleatwork
    Actually I created an issue on GitHub.
    Jordan R A
    @CrystalLord

    Hello everyone,

    I thought I might as well try here first before making an issue. I have a relatively simple question -- what is the simplest way to append rows to DataFrames?

    In short what I'm trying to do: I want Pandas' append functionality: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.append.html

    I understand DataFrames are immutable, so I'd ultimately be creating a new DataFrame in the end. However, the only way I've seen so far to create such a DataFrame is to create a row iterable, and feed that into another dataFrameOf like so:

        val frame: DataFrame = dataFrameOf("Col1", "Col2") (
            "A", "B"
        )
    
        val newFrame: DataFrame = dataFrameOf("Col1", "Col2") (
            frame.rows.asSequence().map { it.values }.flatten() + sequenceOf("C", "D")
        )
    /**
     * A DataFrame: 2 x 2
     *     Col1   Col2
     * 1      A      B
     * 2      C      D
     */

    This seems particularly ugly (not to mention that the items may be in the wrong order...) There must be a better way, surely?

    Jordan R A
    @CrystalLord
    Hmm, I'll make an issue :)
    And hopefully a pull request.
    Holger Brandl
    @holgerbrandl
    Answer posted under the holgerbrandl/krangl#76
    grahamdaley
    @grahamdaley
    Hello, does krangl have a cumsum (cumulative sum) function?
    Holger Brandl
    @holgerbrandl
    Hey @grahamdaley , sure there is, see holgerbrandl/krangl@51a3956 and in particular the test for some guidance on usage. Feel welcome if you have other questions or comments.
    grahamdaley
    @grahamdaley
    Thanks!
    Mikael Gueck
    @mikaelhg
    With jupyterlab + the Kotlin kernel + krangl + kravis, for some reason, kravis always opens a new window when showing the graph, instead of embedding it into the Jupyter notebook results. Any workaround?
    Holger Brandl
    @holgerbrandl
    It should autodetect that it is running in a jupypter env. However the detection logic might be no longer valid, see https://github.com/holgerbrandl/kravis/blob/7a46b57ec1e467d1ce9ca8b1ac32f19fff8b5ae8/src/main/kotlin/kravis/GGPlot2.kt#L24
    Could you try to force jupyter as output mode by settings
    SessionPrefs.OUTPUT_DEVICE = JupyterDevice()
    ?
    In addition support is suboptimal because of Kotlin/kotlin-jupyter#12 which you may want to vote for.
    AngieTanesha
    @AngieTanesha

    Hello everyone, I'm very new to using Kotlin and Krangl so this might be really obvious, but after implementing Krangl by using implementation "de.mpicbg.scicomp:krangl:0.13" in build.gradle (Module:app), I get a CONFIGURE SUCCESSFUL. But after running the app, I get an error:

    Task :app:mergeExtDexDebug FAILED
    'Method name '=' in class 'krangl.Extensions' cannot be represented in dex format.

    Even after commenting out the function imports and where I've used the functions. The only way to get rid of this error is to remove the implementation... What's happening? Any tips/help is much appreciated!

    Where I implemented Krangl: https://github.com/AngieTanesha/viscosity-calculator/blob/master/app/build.gradle
    Functions used: https://github.com/AngieTanesha/viscosity-calculator/blob/master/app/src/main/java/com/angiemochie/viscositycalculator/vi.kt

    Holger Brandl
    @holgerbrandl
    Indeed @AngieTanesha this is a known problem. See https://discuss.kotlinlang.org/t/android-issue-with-backticked-method-names/66. Not sure how to deal with it.
    Maxim
    @Linux4win_gitlab
    When anyone's online: I have a short question regarding column types. Is there any way to cast a DataCol (e.g. a StringCol) to a different type of DataCol (e.g. an IntCol)?
    I couldn't find anything in the docs. Any help is appreciated!
    chudo19
    @chudo19
    Hello, where can I read more about roadmap item "Pluggable backends like native or SQL". Any dates for it ?