python 3.x - Pandas use series to select column names -


if have series ('a','b') pulled in column pandas.read_csv, how can use select columns data frame this?

pd.dataframe={'a':[1,2,3],'b':[2,3,4]} 

thanks in advance!

i had change list , pass columns this:

list=list(series) df=df[list] 

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -