Code Monkey home page Code Monkey logo

Comments (8)

mkborregaard avatar mkborregaard commented on August 12, 2024

Yes, I've been thinking @df actually wasn't the best name for this macro - you're overwriting the name.

from statsplots.jl.

mkborregaard avatar mkborregaard commented on August 12, 2024

Or I'd say you might be, but exactly the code as you've written it there works on my system.

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.6.0 (2017-06-19 13:05 UTC)
 _/ |\__'_|_|_|\__'_|  |  Official http://julialang.org/ release
|__/                   |  x86_64-apple-darwin13.4.0

julia> using DataFrames, StatPlots, Query

julia> df = DataFrame(a = 1:10, b = 10*rand(10), c = 10 * rand(10))
10×3 DataFrames.DataFrame
│ Row │ a  │ b        │ c       │
├─────┼────┼──────────┼─────────┤
│ 1   │ 1  │ 3.31419  │ 2.36812 │
│ 2   │ 2  │ 9.0484   │ 9.04473 │
│ 3   │ 3  │ 5.70963  │ 4.92028 │
│ 4   │ 4  │ 3.35355  │ 5.24056 │
│ 5   │ 5  │ 0.247405 │ 1.24984 │
│ 6   │ 6  │ 7.58326  │ 6.74103 │
│ 7   │ 7  │ 5.44256  │ 2.04002 │
│ 8   │ 8  │ 6.63369  │ 9.74979 │
│ 9   │ 9  │ 0.752923 │ 4.5596  │
│ 10  │ 10 │ 4.46977  │ 4.25324 │

julia> df |>
                 @where(_.a > 5) |>
                 @select({_.b, d = _.c-10}) |>
                 @df scatter(:b, :d)

julia> Pkg.status.(["StatPlots","Query","DataFrames"])
 - StatPlots                     0.5.0+             master
 - Query                         0.7.2
 - DataFrames                    0.10.1+            confidence-intervals-with-predict #never mind this

from statsplots.jl.

mkborregaard avatar mkborregaard commented on August 12, 2024

Could you try to update Query? It seems unlikely to be the issue, but how otherwise to explain the discrepancy? What is your default backend?

from statsplots.jl.

floswald avatar floswald commented on August 12, 2024

i was trying to

julia> Pkg.checkout("StatPlots")
INFO: Checking out StatPlots master...
INFO: Pulling StatPlots latest master...
ERROR: fixed packages introduce conflicting requirements for IterableTables: 
         StatPlots requires versions [0.5.0,∞)
         Query requires versions [0.1.0,0.5.0)
       the requirements are unsatisfiable because their intersection is empty

from statsplots.jl.

mkborregaard avatar mkborregaard commented on August 12, 2024

No, update Query first

from statsplots.jl.

floswald avatar floswald commented on August 12, 2024

works! awesome.

sorry but I thought i am on version 0.7.2? i'm confused by this

julia> Pkg.status.(["StatPlots","Query","DataFrames"])
 - StatPlots                     0.5.0
 - Query                         0.6.0              v0.7.2

doesn't that mean that i was on branch v0.7.2.? you can close this, thanks.

from statsplots.jl.

mkborregaard avatar mkborregaard commented on August 12, 2024

phew! Not sure about that line in fact.

from statsplots.jl.

piever avatar piever commented on August 12, 2024

The curried version of @df was added a bit after the non curried one and is needed for the pipeline syntax. I don't think there is danger of overwriting as only the macro is exported. Otoh it's important to be on a recent version of Query because the super useful stand alone macros are a very recent addition.

from statsplots.jl.

Related Issues (20)

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.