pgfplotstable - Error while transposing a CSV table which is read from diskPutting multiple columns from csv file into single column while printing the table using pgfplotstablepgfplotstableread fails to read the input fileBarchart, Boxplot Data Table PGF Math Errors from mixed format inline datapgfplotstable error on readGet element from a tableReading xticklabels from a csvpgfplotstabletypeset not opening csv file when using latexdiffReading string from CSV in pgfplotstableHelp with pgfplotsPlotting a 3D data-set from a .csv file

Do people actually use the word "kaputt" in conversation?

I keep switching characters, how do I stop?

How would a solely written language work mechanically

New Order #2: Turn My Way

Can you take a "free object interaction" while incapacitated?

If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?

Hashing password to increase entropy

What (if any) is the reason to buy in small local stores?

Can a Knock spell open the door to Mordenkainen's Magnificent Mansion?

What is the tangent at a sharp point on a curve?

Capacitor electron flow

When is the exact date for EOL of Ubuntu 14.04 LTS?

Derivative of an interpolated function

Not hide and seek

Walter Rudin's mathematical analysis: theorem 2.43. Why proof can't work under the perfect set is uncountable.

How to preserve electronics (computers, ipads, phones) for hundreds of years?

Mortal danger in mid-grade literature

Trouble reading roman numeral notation with flats

"Marked down as someone wanting to sell shares." What does that mean?

Is divisi notation needed for brass or woodwind in an orchestra?

Is there any common country to visit for persons holding UK and Schengen visas?

Extract substring according to regexp with sed or grep

Did I make a mistake by ccing email to boss to others?

Reasons for having MCU pin-states default to pull-up/down out of reset



pgfplotstable - Error while transposing a CSV table which is read from disk


Putting multiple columns from csv file into single column while printing the table using pgfplotstablepgfplotstableread fails to read the input fileBarchart, Boxplot Data Table PGF Math Errors from mixed format inline datapgfplotstable error on readGet element from a tableReading xticklabels from a csvpgfplotstabletypeset not opening csv file when using latexdiffReading string from CSV in pgfplotstableHelp with pgfplotsPlotting a 3D data-set from a .csv file













1















I want to read a CSV file from disk and then transpose the table that I read. When I create the table in my document, there is no problem with pgfplotstabletranspose command. However, when I try to read the file from the disk, I get an error as




Package pgfplots Error: Sorry, could not retrieve column 'Label' from
table 'attachments/paper_survey.csv'. Please check spelling (or
introduce name aliases)..




This is my MWE:



documentclass[]article
usepackagepgfplots,pgfplotstable
begindocument

pgfplotstableread[col sep=semicolon]% Read the data into a table macro
Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
Yes;0.00;0.20;0.00;0.26;0.11;0.00;;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
No;1.00;0.80;1.00;0.74;0.89;1.00;;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53
datatable

% pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

pgfplotstabletranspose[string type,
colnames from=Label,
input colnames to=Label
]datatabletransposeddatatable

enddocument


How can I fix this?










share|improve this question



















  • 1





    @Raaja I updated my MWE.

    – yildizabdullah
    Mar 12 at 12:48















1















I want to read a CSV file from disk and then transpose the table that I read. When I create the table in my document, there is no problem with pgfplotstabletranspose command. However, when I try to read the file from the disk, I get an error as




Package pgfplots Error: Sorry, could not retrieve column 'Label' from
table 'attachments/paper_survey.csv'. Please check spelling (or
introduce name aliases)..




This is my MWE:



documentclass[]article
usepackagepgfplots,pgfplotstable
begindocument

pgfplotstableread[col sep=semicolon]% Read the data into a table macro
Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
Yes;0.00;0.20;0.00;0.26;0.11;0.00;;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
No;1.00;0.80;1.00;0.74;0.89;1.00;;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53
datatable

% pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

pgfplotstabletranspose[string type,
colnames from=Label,
input colnames to=Label
]datatabletransposeddatatable

enddocument


How can I fix this?










share|improve this question



















  • 1





    @Raaja I updated my MWE.

    – yildizabdullah
    Mar 12 at 12:48













1












1








1








I want to read a CSV file from disk and then transpose the table that I read. When I create the table in my document, there is no problem with pgfplotstabletranspose command. However, when I try to read the file from the disk, I get an error as




Package pgfplots Error: Sorry, could not retrieve column 'Label' from
table 'attachments/paper_survey.csv'. Please check spelling (or
introduce name aliases)..




This is my MWE:



documentclass[]article
usepackagepgfplots,pgfplotstable
begindocument

pgfplotstableread[col sep=semicolon]% Read the data into a table macro
Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
Yes;0.00;0.20;0.00;0.26;0.11;0.00;;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
No;1.00;0.80;1.00;0.74;0.89;1.00;;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53
datatable

% pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

pgfplotstabletranspose[string type,
colnames from=Label,
input colnames to=Label
]datatabletransposeddatatable

enddocument


How can I fix this?










share|improve this question
















I want to read a CSV file from disk and then transpose the table that I read. When I create the table in my document, there is no problem with pgfplotstabletranspose command. However, when I try to read the file from the disk, I get an error as




Package pgfplots Error: Sorry, could not retrieve column 'Label' from
table 'attachments/paper_survey.csv'. Please check spelling (or
introduce name aliases)..




This is my MWE:



documentclass[]article
usepackagepgfplots,pgfplotstable
begindocument

pgfplotstableread[col sep=semicolon]% Read the data into a table macro
Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
Yes;0.00;0.20;0.00;0.26;0.11;0.00;;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
No;1.00;0.80;1.00;0.74;0.89;1.00;;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53
datatable

% pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

pgfplotstabletranspose[string type,
colnames from=Label,
input colnames to=Label
]datatabletransposeddatatable

enddocument


How can I fix this?







pgfplotstable






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 12 at 12:45







yildizabdullah

















asked Mar 12 at 12:23









yildizabdullahyildizabdullah

1805




1805







  • 1





    @Raaja I updated my MWE.

    – yildizabdullah
    Mar 12 at 12:48












  • 1





    @Raaja I updated my MWE.

    – yildizabdullah
    Mar 12 at 12:48







1




1





@Raaja I updated my MWE.

– yildizabdullah
Mar 12 at 12:48





@Raaja I updated my MWE.

– yildizabdullah
Mar 12 at 12:48










1 Answer
1






active

oldest

votes


















0














I have no problem running your data from the attachments subfolder



You may want to check the "G" values since there was an empty yes/no slot and the "O" values are 0



Double check your subfolder/file name are correct since this combination worked for me



mainTeXfolder/attachments/paper_survey.csv



Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
Yes;0.00;0.20;0.00;0.26;0.11;0.00;0.0;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
No;1.00;0.80;1.00;0.74;0.89;1.00;0.0;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53


enter image description here



Since you did not elect plot method I used your same one from a previous question



documentclass[]article
usepackagepgfplots,pgfplotstable
pgfplotssetcompat=1.16
begindocument
pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

begintikzpicture
pgfplotstabletranspose[string type, colnames from=Label, input colnames to=Label]datatabletransposeddatatable
beginaxis[
xbar stacked, % Stacked horizontal bars
xmin=0, % Start x axis at 0
ytick=data, % Use as many tick labels as y coordinates
yticklabels from table=datatabletransposedLabel % Get the labels from the Label column of the datatable
]
addplot [fill=green!70!blue] table [x=Yes, y expr=coordindex] datatabletransposed;
addplot [fill=red!70!blue] table [x=No, y expr=coordindex] datatabletransposed;
endaxis
endtikzpicture

enddocument




share






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "85"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479084%2fpgfplotstable-error-while-transposing-a-csv-table-which-is-read-from-disk%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    I have no problem running your data from the attachments subfolder



    You may want to check the "G" values since there was an empty yes/no slot and the "O" values are 0



    Double check your subfolder/file name are correct since this combination worked for me



    mainTeXfolder/attachments/paper_survey.csv



    Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
    Yes;0.00;0.20;0.00;0.26;0.11;0.00;0.0;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
    No;1.00;0.80;1.00;0.74;0.89;1.00;0.0;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
    High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
    Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
    Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53


    enter image description here



    Since you did not elect plot method I used your same one from a previous question



    documentclass[]article
    usepackagepgfplots,pgfplotstable
    pgfplotssetcompat=1.16
    begindocument
    pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

    begintikzpicture
    pgfplotstabletranspose[string type, colnames from=Label, input colnames to=Label]datatabletransposeddatatable
    beginaxis[
    xbar stacked, % Stacked horizontal bars
    xmin=0, % Start x axis at 0
    ytick=data, % Use as many tick labels as y coordinates
    yticklabels from table=datatabletransposedLabel % Get the labels from the Label column of the datatable
    ]
    addplot [fill=green!70!blue] table [x=Yes, y expr=coordindex] datatabletransposed;
    addplot [fill=red!70!blue] table [x=No, y expr=coordindex] datatabletransposed;
    endaxis
    endtikzpicture

    enddocument




    share



























      0














      I have no problem running your data from the attachments subfolder



      You may want to check the "G" values since there was an empty yes/no slot and the "O" values are 0



      Double check your subfolder/file name are correct since this combination worked for me



      mainTeXfolder/attachments/paper_survey.csv



      Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
      Yes;0.00;0.20;0.00;0.26;0.11;0.00;0.0;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
      No;1.00;0.80;1.00;0.74;0.89;1.00;0.0;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
      High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
      Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
      Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53


      enter image description here



      Since you did not elect plot method I used your same one from a previous question



      documentclass[]article
      usepackagepgfplots,pgfplotstable
      pgfplotssetcompat=1.16
      begindocument
      pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

      begintikzpicture
      pgfplotstabletranspose[string type, colnames from=Label, input colnames to=Label]datatabletransposeddatatable
      beginaxis[
      xbar stacked, % Stacked horizontal bars
      xmin=0, % Start x axis at 0
      ytick=data, % Use as many tick labels as y coordinates
      yticklabels from table=datatabletransposedLabel % Get the labels from the Label column of the datatable
      ]
      addplot [fill=green!70!blue] table [x=Yes, y expr=coordindex] datatabletransposed;
      addplot [fill=red!70!blue] table [x=No, y expr=coordindex] datatabletransposed;
      endaxis
      endtikzpicture

      enddocument




      share

























        0












        0








        0







        I have no problem running your data from the attachments subfolder



        You may want to check the "G" values since there was an empty yes/no slot and the "O" values are 0



        Double check your subfolder/file name are correct since this combination worked for me



        mainTeXfolder/attachments/paper_survey.csv



        Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
        Yes;0.00;0.20;0.00;0.26;0.11;0.00;0.0;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
        No;1.00;0.80;1.00;0.74;0.89;1.00;0.0;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
        High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
        Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
        Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53


        enter image description here



        Since you did not elect plot method I used your same one from a previous question



        documentclass[]article
        usepackagepgfplots,pgfplotstable
        pgfplotssetcompat=1.16
        begindocument
        pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

        begintikzpicture
        pgfplotstabletranspose[string type, colnames from=Label, input colnames to=Label]datatabletransposeddatatable
        beginaxis[
        xbar stacked, % Stacked horizontal bars
        xmin=0, % Start x axis at 0
        ytick=data, % Use as many tick labels as y coordinates
        yticklabels from table=datatabletransposedLabel % Get the labels from the Label column of the datatable
        ]
        addplot [fill=green!70!blue] table [x=Yes, y expr=coordindex] datatabletransposed;
        addplot [fill=red!70!blue] table [x=No, y expr=coordindex] datatabletransposed;
        endaxis
        endtikzpicture

        enddocument




        share













        I have no problem running your data from the attachments subfolder



        You may want to check the "G" values since there was an empty yes/no slot and the "O" values are 0



        Double check your subfolder/file name are correct since this combination worked for me



        mainTeXfolder/attachments/paper_survey.csv



        Label;A;B;C;D;E;F;G;H;I;J;K;L;M;N;O
        Yes;0.00;0.20;0.00;0.26;0.11;0.00;0.0;0.49;0.14;0.31;0.03;0.60;0.06;0.06;0.00
        No;1.00;0.80;1.00;0.74;0.89;1.00;0.0;0.51;0.86;0.69;0.97;0.40;0.94;0.94;0.00
        High;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.26
        Medium;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.21
        Low;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.00;0.53


        enter image description here



        Since you did not elect plot method I used your same one from a previous question



        documentclass[]article
        usepackagepgfplots,pgfplotstable
        pgfplotssetcompat=1.16
        begindocument
        pgfplotstableread[col sep = semicolon]attachments/paper_survey.csvdatatable

        begintikzpicture
        pgfplotstabletranspose[string type, colnames from=Label, input colnames to=Label]datatabletransposeddatatable
        beginaxis[
        xbar stacked, % Stacked horizontal bars
        xmin=0, % Start x axis at 0
        ytick=data, % Use as many tick labels as y coordinates
        yticklabels from table=datatabletransposedLabel % Get the labels from the Label column of the datatable
        ]
        addplot [fill=green!70!blue] table [x=Yes, y expr=coordindex] datatabletransposed;
        addplot [fill=red!70!blue] table [x=No, y expr=coordindex] datatabletransposed;
        endaxis
        endtikzpicture

        enddocument





        share











        share


        share










        answered 3 mins ago









        KJOKJO

        3,1381120




        3,1381120



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479084%2fpgfplotstable-error-while-transposing-a-csv-table-which-is-read-from-disk%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

            152 Atala Notae | Nexus externi | Tabula navigationis"Discovery Circumstances: Numbered Minor Planets"2000152Small-Body Database

            Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"