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.

Clear example of external CSV or JSON file read

See original GitHub issue

It would be great to have a clear, short example of an external CSV or JSON file read using open_url or pyfetch and process it through some numerical routines like NumPy or Pandas. This will be bread and butter for data science folks.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
verhulstmcommented, May 2, 2022

hi, thanks for your interest in our new project. 😃

take a look at this

https://github.com/pyscript/pyscript/blob/main/pyscriptjs/examples/folium.html

url = ( “https://raw.githubusercontent.com/python-visualization/folium/master/examples/data” ) state_geo = f"{url}/us-states.json" state_unemployment = f"{url}/US_Unemployment_Oct2012.csv" state_data = pd.read_csv(open_url(state_unemployment)) geo_json = json.loads(open_url(state_geo).read())

0reactions
marimeirelescommented, Sep 8, 2022

I believe @ptmcg answered this one? Feel free to reopen if you’re still stuck, I’m tracking this kind of I/O issue on the linked issue though. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Querying external CSV, TSV and JSON files from your ...
I would like to provide here some practical examples and best practices of how to make use of the powerful data loading and...
Read more >
Postman - Data Driven - External Files (Both JSON and CSV)
Ways to run request within Postman with different sets of values(data):-1. Duplicate requests and supply different data in each request2.
Read more >
Step-3: Reading data files, Scenario Outline, CSV files, Callers
Mastering Karate in Five Steps - Step-3: Reading data files, Scenario Outline, CSV files, Callers. This article will be about more advanced ...
Read more >
Chapter 14 – Working with CSV Files and JSON Data
A Reader object lets you iterate over lines in the CSV file. Enter the following into the interactive shell, with example.csv in the...
Read more >
Read/Write JSON Files with Node.js | heynode.com
In this tutorial we'll: Read JSON data from disk; Learn to use fs module to interact with the filesystem; Persist data to a...
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