This is the start and returned values of the function I used to get some values:
def gal_uvw(distance=None, lsr=None, ra=None, dec=None, pmra=None, pmdec=None, vrad=None, plx=None):
return (u,v,w)
I used column values of a dataframe(df) as variables of this function, and got a list of returned u,v and w values.
def gal_uvw(distance=None, lsr=None, ra=df['Col1'], dec=df['Col2'],
pmra=df['Col3'], pmdec=df['Col4'], vrad=df['Col5'], plx=None)
Output:(1 0.076253
2 43.303953
...
506 -51.194802
1 -8.192123
2 -47.063398
...
506 -22.488182)
How do I get these u,v and w lists of values and add them to the df I used in order to work the function? Each group of numbers would be a new column, so that I'd have:
df['U']=u
df['V']=v
df['W']=w