Giter Club home page Giter Club logo

csvbase-client's Introduction

csvbase logo

csvbase-client

The command line client and pandas integration for csvbase.

Status

Semantic versioning is followed, see the changelog.

Usage

Get a table

In pandas:

>>> import pandas as pd
>>> pd.read_csv("csvbase://meripaterson/stock-exchanges")
>>> pd.read_csv("csvbase://meripaterson/stock-exchanges")
     csvbase_row_id      Continent                   Country                                     Name   MIC Last changed
0                 1         Africa                   Lesotho                                    HYBSE   NaN   2019-03-25
1                 2           Asia                Kazakhstan    Astana International Financial Centre  AIXK   2018-11-18
2                 3         Africa              South Africa                                    ZAR X  ZARX   2018-11-18
3                 4  South America                 Argentina             Bolsas y Mercados Argentinos   NaN   2018-04-02
4                 5  North America  United States of America                  Delaware Board of Trade   NaN   2018-04-02
..              ...            ...                       ...                                      ...   ...          ...
246             247  North America  United States of America                 Long-Term Stock Exchange  LTSE   2020-09-14
247             248  North America  United States of America  Miami International Securities Exchange  MIHI   2020-09-24
248             249  North America  United States of America                        Members' Exchange   NaN   2020-09-24
249             250         Africa                  Zimbabwe            Victoria Falls Stock Exchange   NaN   2020-11-01
250             251           Asia                     China                   Beijing Stock Exchange   NaN   2021-12-27

[251 rows x 6 columns]

From the command line

csvbase-client table get meripaterson/stock-exchanges
csvbase_row_id,Continent,Country,Name,MIC,Last changed
1,Africa,Lesotho,HYBSE,,2019-03-25
2,Asia,Kazakhstan,Astana International Financial Centre,AIXK,2018-11-18
3,Africa,South Africa,ZAR X,ZARX,2018-11-18
[ full file omitted ]

Set (aka "upsert") a table:

csvbase-client table set meripaterson/stock-exchanges stock-exchanges.csv

Nothing is output upon success and exit code is 0.

Installing

Executable

Download these from the github release page.

Pip + PyPI

pip install csvbase-client

Docker

docker pull calpaterson/csvbase-client

Then when you run:

# mount your own xdg-cache directory as a volume inside the container
docker run -v "${XDG_CACHE_HOME:-$HOME/.cache}":/root/.cache calpaterson/csvbase-client

csvbase-client's People

Contributors

calpaterson 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

Watchers

 avatar  avatar  avatar  avatar

Forkers

kustomzone

csvbase-client's Issues

Parquet support

Brief overview

AS A user of DuckDB (and many other tools)

I WANT csvbase-client to support Parquet as well as csv

SO THAT I can avoid any type inference

Additional details

Add support for non-csvbase HTTP

Brief overview

AS A querier of various datasets

I WANT to be able to query non-csvbase files and tables

SO THAT I can benefit from the caching features without having to use csvbase

Additional details

It should work like:

import pandas as pd

df = pd.read_csv("csvbase://www.example.com/something/something-else.csv")

And it should use Last-Modified/ETags/etc.

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.