1. install odfpy:
pip install odfpy
2. use odf engine in read_excel method
df = pd.read_excel("file.ods" engine="odf")
1. install odfpy:
pip install odfpy
2. use odf engine in read_excel method
df = pd.read_excel("file.ods" engine="odf")
En el campo de "connection settings" se debe de especificar el nombre de la base de datos, el host y el puerto, por ejemplo:
dbname=NombreBaseDeDatos host=localhost port=5432
Especificar el usuario: user1
Create a database:
Create database <database name>
Create a schema:
Create schema <schema name>
Rename a schema:
ALTER SCHEMAname
RENAME TOnew_name
To show the current search path:
SHOW search_path;
Put a schema in the path:
SET search_path TO myschema;
Put multiple schemas:
SET search_path TO myschema, public;
Create a
Auto incremental P
rimary Key:
create table test(
id serial primary key
);
Create a table with foreign key:
create table table_A(
field_1,
contraint fk_name foreign key (field_1) references table_B (field_1)
);
Rename a table in postgres:
ALTER TABLE "NambreDeTablaActual" RENAME TO "NuevoNombreTabla";
String to timestamp:
SELECT TO_TIMESTAMP('2023-05-02 00:20:25','YYYY-MM-DD HH24:MI:SS');