Giter VIP home page Giter VIP logo

pgcsv's Introduction

pgcsv

The purpose of pgcsv is to make a CSV file show up in a database. To this end, it will automatically create the table schema and COPY data. It will not attempt to perform type inference. It will not attempt to fix up your CSV file (the file is assumed to be readable as UTF-8 with the first row containing column headers).

Usage

$ pip install pgcsv
$ pgcsv --db postgresql://localhost/database new_table csv_file.csv

pgcsv's People

Contributors

dependabot-preview[bot] avatar pudo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pgcsv's Issues

Error

Traceback (most recent call last):
  File "/usr/local/bin/pgcsv", line 6, in <module>
    from pgcsv.cli import main
  File "/usr/local/lib/python2.7/site-packages/pgcsv/cli.py", line 4, in <module>
    from pgcsv.csv import open_csv
  File "/usr/local/lib/python2.7/site-packages/pgcsv/csv.py", line 3, in <module>
    from normality import guess_encoding
  File "/usr/local/lib/python2.7/site-packages/normality/__init__.py", line 7, in <module>
    from normality.paths import safe_filename  # noqa
  File "/usr/local/lib/python2.7/site-packages/normality/paths.py", line 2, in <module>
    from banal import decode_path
  File "/usr/local/lib/python2.7/site-packages/banal/__init__.py", line 1, in <module>
    from banal.lists import is_sequence, is_listish
  File "/usr/local/lib/python2.7/site-packages/banal/lists.py", line 5
    def is_sequence(obj: Any) -> bool:
                       ^
SyntaxError: invalid syntax

pgcsv is not recognized as an internal or external command

Hello,

am new to pgcsv and command line thingy.

I have a csv and would like to generate a table in my postgres db using this csv.

So, I did pip install pgcsv in my anaconda prompt (which was successful)

Later, naviagated to Jupyter notebook and typed the below command


localhost = 'xxx.x.xxx.xx'
database = 'testdv'
!pgcsv --db postgresql://localhost/database new_table Test_data.csv`

But I got the below warning but jupter cell execution is complete

'pgcsv' is not recognized as an internal or external command,
operable program or batch file.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.