Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add_vector should not require name of named Vector. #510

Open
kojix2 opened this issue Apr 28, 2019 · 1 comment
Open

add_vector should not require name of named Vector. #510

kojix2 opened this issue Apr 28, 2019 · 1 comment

Comments

@kojix2
Copy link
Member

kojix2 commented Apr 28, 2019

EDIT (@v0dro): changing this issue to include only the add_vector part.

Vectors 's @name can be useful.
But daru does not seem to use its features.

For example 

df = Daru::DataFrame.new(a: [1,2,3], b: [4,5,6])
v = df.a
df2 = Daru::DataFrame.new(c: [7,8,9], d: [10,11,12])
df2. add_vector "a", v

The vector knows its name, but the add_vector method requires the name of the vector.

(pseudocode)

df1 = DataFrame.new
v = df["some_vector"]
df2 = DataFrame
df2. add v

The expected behaviour should be that add_vector should pick up the name of the vector by itself.

@v0dro
Copy link
Member

v0dro commented May 30, 2020

This can be separated into two issues:

  1. DataFrame cannot use the name value since it is an internal usage parameter.
  2. add_vector should have an option for not specifying the name of the vector if it already exists within the Vector.

About 1, it cannot be helped since we use the name internally but add_vector is a legit usecase I will amend your issue accordingly.

@v0dro v0dro changed the title @name variable in the dataframe. add_vector should not require name of named Vector. May 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants