I am writing a function in python and I want to be able to rename a pandas data frame within the function.
For example:
def a(test):
df=df*2
test=df
Any help would be appreciated!
To naame a Pandas DataFrame, you just need to execute:
df = pandas.DataFrame(#insert data here)
df
will become the name of your DataFrame.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.