Search code examples
stringcsvbooleanparallel-coordinates

Operator || is undefined for the argument type boolean, String


I'm trying to create a Parallel Coordinate graph with a csv file I have. The graph I'm trying to make looks like the image I have drawn here -> DrawnGraph. The issue I am having is that the countries are listed individually on the csv file. I need to create a code that places the countries within their corresponding continents. I attempted the code below but I keep getting "The operator || is undefined for the argument type(s) boolean, String" I realize that I am typing it wrong but I do not know how to fix it. Help please

    if(Country.equals("Aruba")||Country.equals("Argentina")||Country.equals("Bolivia")||Country.equals("Brazil")||Country.equals("Chile")||("Columbia")||Country.equals("Ecuador")||Country.equals("Guyana")||Country.equals("Paraguay")||Country.equals("Peru")||Country.equals("Suriname")||Country.equals("Uruguay")||Country.equals("Venezuela"))

Solution

  • Looks like you're missing an occurrence of Country.equals here:

    Country.equals("Chile")||("Columbia")||Country.equals("Ecuador")
    

    Add that in and it ought to work.

    By the way, you haven't specified what programming language you're using. You probably should.