Why my frame index is full of 0 when I make it to copy another frame?How to get columns from unsorted rows in Pandas? (MALLET)Convolutional Neural Network not learning EEG dataHow do I convert a pandas dataframe to a 1d array?convert single index pandas data frame to multi-indexWhy there is two output in Titanic case in tflearn quickstart?Classifier training long time due to the size dataProblem faced when collect data randomly from clusterMerging dataframes in Pandas is taking a surprisingly long timeKeras importing two images of same object for ConvLSTMInputting (a lot of )data into a dataframe one row at a time

Has a commercial or military jet bi-plane ever been manufactured?

When does a player choose the creature benefiting from Amass?

Is Cola "probably the best-known" Latin word in the world? If not, which might it be?

Junior developer struggles: how to communicate with management?

What are the differences between credential stuffing and password spraying?

Moving the subject of the sentence into a dangling participle

For a benzene shown in a skeletal structure, what does a substituent to the center of the ring mean?

Why was the battle set up *outside* Winterfell?

Can I get a paladin's steed by True Polymorphing into a monster that can cast Find Steed?

Why do money exchangers give different rates to different bills?

Should one double the thirds or the fifth in chords?

What are the spoon bit of a spoon and fork bit of a fork called?

How can I close a gap between my fence and my neighbor's that's on his side of the property line?

Type-check an expression

Would a 1/1 token with persist dying trigger on death effects a second time?

Answer "Justification for travel support" in conference registration form

My ID is expired, can I fly to the Bahamas with my passport?

Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?

Formatiing text inside tikz node

Is there formal test of non-linearity in linear regression?

Automatically use long arrows in display mode

Quoting Yourself

What is the most remote airport from the center of the city it supposedly serves?

Why is Arya visibly scared in the library in S8E3?



Why my frame index is full of 0 when I make it to copy another frame?


How to get columns from unsorted rows in Pandas? (MALLET)Convolutional Neural Network not learning EEG dataHow do I convert a pandas dataframe to a 1d array?convert single index pandas data frame to multi-indexWhy there is two output in Titanic case in tflearn quickstart?Classifier training long time due to the size dataProblem faced when collect data randomly from clusterMerging dataframes in Pandas is taking a surprisingly long timeKeras importing two images of same object for ConvLSTMInputting (a lot of )data into a dataframe one row at a time













0












$begingroup$


I've got such a code:



df_submission_gb = pd.DataFrame('skilled': (y_pred_gb>0.5).astype(int), index=df_test.index)
df_submission_gb.to_csv('submission_gb_roles.csv')
df_submission_gb.tail()


It takes data from array y_pred_gb and puts it to frame df_submission_gb with indexes from df_test
But output ID field is just zeroes:
enter image description here



But df_test have ID field:



enter image description here



And is is set is index on open:



df_test = pd.read_csv("data/test_extended", index_col="id").drop(columns=["Unnamed: 0"])


Why doesn't it work?










share|improve this question









$endgroup$
















    0












    $begingroup$


    I've got such a code:



    df_submission_gb = pd.DataFrame('skilled': (y_pred_gb>0.5).astype(int), index=df_test.index)
    df_submission_gb.to_csv('submission_gb_roles.csv')
    df_submission_gb.tail()


    It takes data from array y_pred_gb and puts it to frame df_submission_gb with indexes from df_test
    But output ID field is just zeroes:
    enter image description here



    But df_test have ID field:



    enter image description here



    And is is set is index on open:



    df_test = pd.read_csv("data/test_extended", index_col="id").drop(columns=["Unnamed: 0"])


    Why doesn't it work?










    share|improve this question









    $endgroup$














      0












      0








      0





      $begingroup$


      I've got such a code:



      df_submission_gb = pd.DataFrame('skilled': (y_pred_gb>0.5).astype(int), index=df_test.index)
      df_submission_gb.to_csv('submission_gb_roles.csv')
      df_submission_gb.tail()


      It takes data from array y_pred_gb and puts it to frame df_submission_gb with indexes from df_test
      But output ID field is just zeroes:
      enter image description here



      But df_test have ID field:



      enter image description here



      And is is set is index on open:



      df_test = pd.read_csv("data/test_extended", index_col="id").drop(columns=["Unnamed: 0"])


      Why doesn't it work?










      share|improve this question









      $endgroup$




      I've got such a code:



      df_submission_gb = pd.DataFrame('skilled': (y_pred_gb>0.5).astype(int), index=df_test.index)
      df_submission_gb.to_csv('submission_gb_roles.csv')
      df_submission_gb.tail()


      It takes data from array y_pred_gb and puts it to frame df_submission_gb with indexes from df_test
      But output ID field is just zeroes:
      enter image description here



      But df_test have ID field:



      enter image description here



      And is is set is index on open:



      df_test = pd.read_csv("data/test_extended", index_col="id").drop(columns=["Unnamed: 0"])


      Why doesn't it work?







      python pandas






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 10 at 4:34









      biryulin04biryulin04

      11




      11




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "557"
          ;
          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%2fdatascience.stackexchange.com%2fquestions%2f49010%2fwhy-my-frame-index-is-full-of-0-when-i-make-it-to-copy-another-frame%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Data Science 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.

          Use MathJax to format equations. MathJax reference.


          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%2fdatascience.stackexchange.com%2fquestions%2f49010%2fwhy-my-frame-index-is-full-of-0-when-i-make-it-to-copy-another-frame%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

          Adding axes to figuresAdding axes labels to LaTeX figuresLaTeX equivalent of ConTeXt buffersRotate a node but not its content: the case of the ellipse decorationHow to define the default vertical distance between nodes?TikZ scaling graphic and adjust node position and keep font sizeNumerical conditional within tikz keys?adding axes to shapesAlign axes across subfiguresAdding figures with a certain orderLine up nested tikz enviroments or how to get rid of themAdding axes labels to LaTeX figures

          Luettelo Yhdysvaltain laivaston lentotukialuksista Lähteet | Navigointivalikko

          Gary (muusikko) Sisällysluettelo Historia | Rockin' High | Lähteet | Aiheesta muualla | NavigointivalikkoInfobox OKTuomas "Gary" Keskinen Ancaran kitaristiksiProjekti Rockin' High