Categories Python Answers How to select multiple columns in a Python Pandas dataframe? Post author By John Au-Yeung Post date March 24, 2022 No Comments on How to select multiple columns in a Python Pandas dataframe? Spread the love To select multiple columns in a Python Pandas dataframe, we pass in an array of column names to select. For instance, we write df1 = df[['a', 'b']] to select columns 'a' and 'b' and return it. Related Posts How to apply a function to two columns of Pandas DataFrame in Python?Sometimes, we want to apply a function to two columns of Pandas DataFrame in Python.… How to delete a column from a Python Pandas DataFrame?To delete a column from a Python Pandas DataFrame, we call the drop method. For… How to merge multiple data frames with Python Pandas?Sometimes, we want to merge multiple data frames with Python Pandas. In this article, we'll… By John Au-Yeung Web developer specializing in React, Vue, and front end development. View Archive → ← How to delete a column from a Python Pandas DataFrame? → How to get the row count of a Python Pandas DataFrame? Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website Save my name, email, and website in this browser for the next time I comment. Current ye@r * Leave this field empty