question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CartoContext.read not copying schema from pg

See original GitHub issue

When doing a CartoContext.read, the expectation is that the statefips and countyfips in this table will stay as strings (object in pandas), but they are converted to int64 instead: Screen Shot 2019-04-10 at 2 58 41 PM

Selecting from that table with CartoContext.query gives the correct dataframe schema.

cc @oleurud

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
andy-eschcommented, Apr 12, 2019

It’s also possible to pass in the types in the pd.read_csv function like so: pd.read_csv(response, dtype={'col1': int, 'col2': str, 'col3': float, ...})

1reaction
alrocarcommented, Apr 12, 2019

Wait for my next PR 🔥😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

PostgreSQL how to create a copy of a database or schema?
If it's on the same server, you just use the CREATE DATABASE command with the TEMPLATE parameter. For example: CREATE DATABASE newdb WITH...
Read more >
PostgreSQL: How to create full copy of database schema in ...
There's no simple way to do this in pg_dump/pg_restore itself. You could try the following if you are able to remove the database ......
Read more >
Documentation: 15: COPY - PostgreSQL
The name (optionally schema-qualified) of an existing table. column_name. An optional list of columns to be copied. If no column list is specified, ......
Read more >
EDB Postgres Advanced Server v14 - EDB clone schema
EDB Clone Schema is an extension module for EDB Postgres Advanced Server that allows you to copy a schema and its database objects...
Read more >
Create a copy of a Database in PostgreSQL - Data School
For more information continue reading. Starting the Server. The first step to copying a database is to open psql (the postgreSQL command line)....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found