I can connect to a SAP HANA database (in SAP Cloud) using the code below and successfully fetch data into a data frame:
# Connecting to the Database and without the Column Name
connection = pyhdb.connect('localhost', 30111, 'RRR', 'PsW')
cursor = connection.cursor()
cursor.execute("""
SELECT * FROM PAL.VEGETARIAN_PREDICTION
""")
# ab = cursor.fetchall()
data = pd.DataFrame(cursor.fetchall())
Now I got the dataframe, but how can I save the data back to the database? Any coding can provide? Thanks.
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.