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

need to be able to pass pass makeunique=true #7

Open
alex-s-gardner opened this issue Nov 30, 2023 · 0 comments
Open

need to be able to pass pass makeunique=true #7

alex-s-gardner opened this issue Nov 30, 2023 · 0 comments

Comments

@alex-s-gardner
Copy link
Owner

This does not work because the name v is duplicated in output... need to be able to pass makeunique=true:

bs = BinStatistics.binstats(df, :v, 0.0:100.0:6000.0, :v);

ERROR: ArgumentError: Duplicate variable names: :c. Pass makeunique=true to make them unique using a suffix automatically.
Stacktrace:
  [1] make_unique!(names::Vector{Symbol}, src::Vector{Symbol}; makeunique::Bool)
    @ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/other/utils.jl:99
  [2] make_unique!
    @ ~/.julia/packages/DataFrames/58MUJ/src/other/utils.jl:77 [inlined]
  [3] #make_unique#4
    @ ~/.julia/packages/DataFrames/58MUJ/src/other/utils.jl:121 [inlined]
  [4] make_unique
    @ ~/.julia/packages/DataFrames/58MUJ/src/other/utils.jl:120 [inlined]
  [5] #Index#7
    @ ~/.julia/packages/DataFrames/58MUJ/src/other/index.jl:27 [inlined]
  [6] Index
    @ ~/.julia/packages/DataFrames/58MUJ/src/other/index.jl:26 [inlined]
  [7] manipulate(df::DataFrame, args::Vector{Int64}; copycols::Bool, keeprows::Bool, renamecols::Bool)
    @ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/abstractdataframe/selection.jl:1825
  [8] manipulate
    @ ~/.julia/packages/DataFrames/58MUJ/src/abstractdataframe/selection.jl:1823 [inlined]
  [9] select
    @ ~/.julia/packages/DataFrames/58MUJ/src/abstractdataframe/selection.jl:1298 [inlined]
 [10] binstats(df::DataFrame, axis_col::Symbol, axis_edges::StepRangeLen{…}, bin_col::Symbol; grp_function::Vector{…}, col_function::Vector{…}, missing_bins::Bool)
    @ BinStatistics ~/.julia/packages/BinStatistics/w35YT/src/functions.jl:103
 [11] binstats(df::DataFrame, axis_col::Symbol, axis_edges::StepRangeLen{…}, bin_col::Symbol)
    @ BinStatistics ~/.julia/packages/BinStatistics/w35YT/src/functions.jl:73
 [12] top-level scope
    @ ~/Documents/GitHub/Altim/src/sampling_test.jl:1
    ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant