Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

select columns to include in new dataframe in python

new = old[['A', 'C', 'D']].copy()
Comment

select columns to include in new dataframe in python

new = old.filter(['A','B','D'], axis=1)
Comment

PREVIOUS NEXT
Code Example
Python :: cheat sheet python 
Python :: build a pile of cubes python 
Python :: python read file into variable 
Python :: process rows of dataframe in parallel 
Python :: python random randint string 
Python :: if main python 
Python :: python3 shebang 
Python :: python getters and setters 
Python :: python add to list 
Python :: create columns in streamlit 
Python :: python multiplication array 
Python :: blender scripting set active ojbect 
Python :: python look up how many rows in dataframe 
Python :: Reading JSON from a File with Python 
Python :: Calculate Euclidean Distance in Python using norm() 
Python :: different states of a button tkinter 
Python :: python tkinter arabic 
Python :: how to do a print statement in python 
Python :: handle 404 in requests python 
Python :: string to tuple python 
Python :: open csv from url python 
Python :: timer 1hr 
Python :: python program to print ASCII characters in lowercase 
Python :: Sending POST request in Django 
Python :: distplot in python 
Python :: matplotlib set integer ticks 
Python :: pandas apply lambda function with assign 
Python :: capitalize first letter of each word python 
Python :: py foreach 
Python :: python iterate through objects attributes 
ADD CONTENT
Topic
Content
Source link
Name
7+4 =