Python Forum
How to combine two float64 column vector?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to combine two float64 column vector?
#1
Hi All

I've 2 float64 column vector with same row and i would like to combine them as a one float64 matrix.

I tried df.replace from pandas and it gives me an error like this:

Error:
X_test= df.replace(to_replace=X_test[:,2799], value=result[:,0]) Traceback (most recent call last): File "<ipython-input-68-b1967d57b9e4>", line 1, in <module> X_test= df.replace(to_replace=X_test[:,2799], value=result[:,0]) NameError: name 'df' is not defined
can someone tell me where I'm doing wrong? or is there an alternative way to do this?
Reply
#2
You haven't shown the code that df is defined in and the error is saying that it hasn't been defined.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to combine multiple column values into 1? cubangt 15 2,780 Aug-11-2022, 08:25 PM
Last Post: cubangt
Question How to understand the vector/direction mason321 0 1,100 Dec-14-2021, 10:57 PM
Last Post: mason321
  How to find vector of a 3D plot mason321 0 1,006 Nov-13-2021, 05:05 PM
Last Post: mason321
  Pandas DataFrame combine rows by column value, where Date Rows are NULL rhat398 0 2,105 May-04-2021, 10:51 PM
Last Post: rhat398
  How do I make a symmetric matrix from a column vector? leocsmith 3 3,655 Mar-30-2021, 10:17 AM
Last Post: leocsmith
  3D vector class with inheritance from 2D vector class buss0140 4 3,103 Dec-20-2020, 08:44 PM
Last Post: deanhystad
  how to combine rows to a column base on ids zhujp98 0 1,482 Nov-03-2020, 04:10 PM
Last Post: zhujp98
  Issue with def norm in class Vector DimosG 4 2,477 Mar-26-2020, 05:03 PM
Last Post: DimosG
  Problem in creating a vector termo 11 3,883 Oct-10-2019, 03:09 PM
Last Post: stullis
  Creating Vector from a Program ericvrocha 3 1,883 Oct-08-2019, 07:43 AM
Last Post: newbieAuggie2019

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020