4

When I read my csv file below

"Data Source","World Development Indicators",

"Last Updated Date","2017-02-01",

"Country Name","Country Code","Indicator Name","Indicator Code","1960","1961","1962","1963","1964","1965","1966","1967",...
Actual data...

enter image description here

"_1" is added to "1960","1961",...

Why does it happen and how can I avoid it?

My environment is Ubuntu 14.04 and QGIS 2.18.1

  • 7
    Neither "1960" nor "1960_1" is a legal SQL identifier (they would need to start with an alpha [a-z]), but "1960_1" is at least a string. – Vince Feb 19 '17 at 21:08
  • 1
    using column names that start with a number will cause problems later if you try to style the layer using those columns, – Ian Turton Feb 20 '17 at 9:03
  • Ok, so it's related to SQL and to make is explicitly string, it automatically add "_1". I don't know much about SQL but it seems like I should change column names before importing to QGIS. Thank you for the comments! – user26767 Feb 26 '17 at 17:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.