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

            acmart: Multiple authors: all with same affiliation, one author an additional affiliationHow to Write Names of Multiple Authors with Shared Affiliation in ACM 2017 Template?Multiple authors with different primary affiliation, but same additional affiliationSame affiliation for all authors without extra packagesIOS-Book-Article.cls: one author with multiple affiliationacmart: Shared Author AffiliationMultiple authors with different primary affiliation, but same additional affiliationAuthor affiliation with only 1 authorAdding Multiple Authors with Different Affiliation in LaTeX ArticleLaTeX: Multiple authors stays on same lineHow to Label Multiple Authors with Same DescriptionHow to make two authors use the same affiliationTwo authors with same affiliation on finished front page

            How to write “ä” and other umlauts and accented letters in bibliography?Accents in BibTeXSorting references with special characters alphabeticallyUse ae ligature in bibliographyEastern European nameInverted circumflex in BibTexBibTex, non-ascii initials and nameptr fproblems with accent in LatexHow to add a Ø to my bibliography from Jabref?References without accentsTroubles when trying to cite St“omer-Verlet in ”title" field of a bib entryComprehensive list of accented charactersHow to type the letter “i” with two dots (diaeresis) in math mode?Problem with glossary text and accented lettersSpecial character in bibliographyAccented letters, Unicode and LaTeX accentsHow to stop natbib from modifying bibliography styleCitation of a paper with non-standard characters by BibtexWrite accented characters to file using writeHow to group the bibliography alphabetically, if some surnames start with “accented” characters?How can I automatically capitalize significant words in my bibliography?

            How to remove border form elements in the last row?Targeting flex items on the last rowHow to vertically wrap content with flexbox?Remove border from IFrameCSS3's border-radius property and border-collapse:collapse don't mix. How can I use border-radius to create a collapsed table with rounded corners?Div width 100% minus fixed amount of pixelsBorder around specific rows in a table?How to remove border (outline) around text/input boxes? (Chrome)How do I remove the space between inline-block elements?Flex-box: Align last row to gridRemove blue border from css custom-styled button in ChromeFill remaining vertical space with CSS using display:flexhow style elements in the last row of flexbox row layout with pure css without js