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
$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:
But df_test have ID field:
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
$endgroup$
add a comment |
$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:
But df_test have ID field:
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
$endgroup$
add a comment |
$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:
But df_test have ID field:
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
$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:
But df_test have ID field:
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
python pandas
asked Apr 10 at 4:34
biryulin04biryulin04
11
11
add a comment |
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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