Coder Social home page Coder Social logo

Comments (10)

ngoix avatar ngoix commented on June 14, 2024 1

is it because you put = in your feature names?

from skope-rules.

CCNOAI avatar CCNOAI commented on June 14, 2024 1

@osdiego Did you copy and paste from another document. The "-3" is not being read correctly by the query function. Try removing/deleting the minus and replacing it. Let me know if this works.

from skope-rules.

saurabhdaalia avatar saurabhdaalia commented on June 14, 2024

I see, I think that might be the issue.
But what is causing this issue? Is there any workaround for it?

from skope-rules.

ngoix avatar ngoix commented on June 14, 2024

the variable names are parsed to build the rules, which causes your bug.
I don't see an easy workaround. You really shouldn't put = in your feature names...

from skope-rules.

marco-c avatar marco-c commented on June 14, 2024

You really shouldn't put = in your feature names...

Feature names are strings, so it seems like a limitation to restrict what they can contain (everything else in the scikit-learn world doesn't care about it). Maybe it should be allowed, or at least documented somewhere?

from skope-rules.

ngoix avatar ngoix commented on June 14, 2024

you are right this should be documented. Feel free to open a PR for that or for fixing the syntax error :)

from skope-rules.

 avatar commented on June 14, 2024

Guys, I too get the similar error, when I run the below command, if I remove the pipe, it works with only one condition

SyntaxError: Python keyword not valid identifier in numexpr query

Error is --- train_outliers = train.query('age_z > 3 | age_z < ‐3')

from skope-rules.

vedal avatar vedal commented on June 14, 2024

Guys, I too get the similar error, when I run the below command, if I remove the pipe, it works with only one condition

SyntaxError: Python keyword not valid identifier in numexpr query

Error is --- train_outliers = train.query('age_z > 3 | age_z < ‐3')

This happened to me as well. The problem was that I kept holding down the alt-key when writing the following the pipe symbol. I encounter this frequently, as writing pipe requires me to hold alt.

from skope-rules.

osdiego avatar osdiego commented on June 14, 2024

Guys, I too get the similar error, when I run the below command, if I remove the pipe, it works with only one condition
SyntaxError: Python keyword not valid identifier in numexpr query
Error is --- train_outliers = train.query('age_z > 3 | age_z < ‐3')

This happened to me as well. The problem was that I kept holding down the alt-key when writing the following the pipe symbol. I encounter this frequently, as writing pipe requires me to hold alt.

Happened to me too, do anyone know how to fix?! Thanks xD

from skope-rules.

osdiego avatar osdiego commented on June 14, 2024

@CCNOAI I'm doing something like: (importance >= 0 | importance = -7).
The question is: I need to search like that, is there no way?

from skope-rules.

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.