mirror of
https://github.com/kevinveenbirkenbach/docker-volume-backup.git
synced 2024-11-21 16:01:03 +01:00
Removed deprecated warning
This commit is contained in:
parent
bcc8a7fb00
commit
de59646fc0
@ -19,9 +19,11 @@ def check_and_add_entry(file_path, host, database, username, password):
|
|||||||
else:
|
else:
|
||||||
print("Adding new entry.")
|
print("Adding new entry.")
|
||||||
|
|
||||||
# Add (or replace) the entry
|
# Create a new DataFrame for the new entry
|
||||||
new_entry = {'host': host, 'database': database, 'username': username, 'password': password}
|
new_entry = pd.DataFrame([{'host': host, 'database': database, 'username': username, 'password': password}])
|
||||||
df = df.append(new_entry, ignore_index=True)
|
|
||||||
|
# Add (or replace) the entry using concat
|
||||||
|
df = pd.concat([df, new_entry], ignore_index=True)
|
||||||
|
|
||||||
# Save the updated CSV file
|
# Save the updated CSV file
|
||||||
df.to_csv(file_path, sep=';', index=False)
|
df.to_csv(file_path, sep=';', index=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user