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

bug: replace does not find user-defined function? #182

Closed
korenmiklos opened this issue Jul 26, 2024 · 1 comment · Fixed by #183
Closed

bug: replace does not find user-defined function? #182

korenmiklos opened this issue Jul 26, 2024 · 1 comment · Fixed by #183
Labels
bug Something isn't working

Comments

@korenmiklos
Copy link
Member

Not sure how to reproduce this bug in a minimal example.

Kezdi.jl> @generate id_type = 1 @if left(frame_id, 2) == "ft"

Kezdi.jl> @replace id_type = 2 @if left(frame_id, 2) == "fc"

ERROR: LoadError: ArgumentError: column name :left not found in the data frame
@korenmiklos korenmiklos added the bug Something isn't working label Jul 26, 2024
@korenmiklos
Copy link
Member Author

julia> @generate x = 1 @if left(t, 1) == "a"
Kezdi.jl> @generate x = 1 @if left(t, 1) == "a"

3×2 DataFrame
 Row │ t       x
     │ String  Int64?
─────┼─────────────────
   1 │ aa            1
   2 │ bb      missing
   3 │ cc      missing

julia> @replace x = 2 @if left(t, 1) == "b"
Kezdi.jl> @replace x = 2 @if left(t, 1) == "b"

ERROR: ArgumentError: column name :left not found in the data frame
Stacktrace:
 [1] lookupname
   @ ~/.julia/packages/DataFrames/58MUJ/src/other/index.jl:413 [inlined]
 [2] getindex
   @ ~/.julia/packages/DataFrames/58MUJ/src/other/index.jl:422 [inlined]
 [3] getindex(df::DataFrame, ::typeof(!), col_ind::Symbol)
   @ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/dataframe/dataframe.jl:557
 [4] getproperty(df::DataFrame, col_ind::Symbol)
   @ DataFrames ~/.julia/packages/DataFrames/58MUJ/src/abstractdataframe/abstractdataframe.jl:431
 [5] top-level scope
   @ ~/Tresorit/Mac/code/julia/Kezdi.jl/src/commands.jl:56

korenmiklos added a commit that referenced this issue Jul 26, 2024
- fixes #182
- new test added
- 405/405 tests pass
- version bumped to 0.5.1
korenmiklos added a commit that referenced this issue Jul 26, 2024
- fixes #182
- new test added
- 405/405 tests pass
- version bumped to 0.5.1
@korenmiklos korenmiklos mentioned this issue Jul 26, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant