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

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

java - Log4j2 configuration not found when running standalone application builded by shade plugin -

python - How do I create a list index that loops through integers in another list -