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

Google sheets equipment borrowing system -

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

c# - Convert type 'System.Collections.Generic.List<string>' to 'System.Collections.Generic.IList<>' -