Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Copying a dataframe in python

import pandas as pd

df = pd.read_csv(r'DataSet.csv')
df_copy = df.copy(deep=False) # shallow copy
df_copy = df.copy(deep=True)  # deep copy (default for 'deep' is true)
 
PREVIOUS NEXT
Tagged: #Copying #dataframe #python
ADD COMMENT
Topic
Name
1+6 =