Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Update db.adddata method to accept Astropy tables #59

Closed
emilylurice opened this issue Jul 6, 2016 · 3 comments
Closed

Update db.adddata method to accept Astropy tables #59

emilylurice opened this issue Jul 6, 2016 · 3 comments
Assignees
Labels

Comments

@emilylurice
Copy link

Possibly related to Issue #20

@dr-rodriguez
Copy link
Member

Is this strictly necessary? If you want to save the rows of an astropy table, you can already add them with add_data. The entire table can be saved with something like:

data = list()
data.append(t.colnames) # t is the astropy table
data += t.as_array().tolist()
db.add_data(data, tablename)

As long as the column names match, this would work to add the table to the database.

Or is the issue referring to adding a full table as a single entry in the database?

@hover2pi
Copy link
Member

Yeah, it's not necessary. It was suggested by the referee on the astrodbkit
paper and seemed useful but definitely not essential.

On Thu, Oct 13, 2016 at 2:24 PM, David Rodriguez [email protected]
wrote:

Is this strictly necessary? If you want to save the rows of an astropy
table, you can already add them with add_data. The entire table can be
saved with something like:

data = list()
data.append(t.colnames) # t is the astropy table
data += t.as_array().tolist()
db.add_data(data, tablename)

As long as the column names match, this would work to add the table to the
database.

Or is the issue referring to adding a full table as a single entry in the
database?


You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
#59 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACHf7RFsqXcy3MFV5xfT0-drXyjNLx7ks5qzndegaJpZM4JGYv5
.

@dr-rodriguez
Copy link
Member

Closing as it was deemed not essential. Re-open if it becomes necessary.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants