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' -

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

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -