Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to set pandas dataframe as global

import pandas as pd

data = pd.DataFrame({'A' : [1, 2, 3, 4],
                     'B' : [1,2,3,4]})
def test():
    global data
    data =  data + 1

test()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #set #pandas #dataframe #global
ADD COMMENT
Topic
Name
8+6 =