skip to Main Content

unable to read json

ValueError Traceback (most recent call last) <ipython-input-8-7c5fcf8552e0> in <cell line: 1>() ----> 1 df2 = pd.read_json('/content/drive/MyDrive/Hackathon project/PS 1,2/no_pii_action_history.json') 6 frames /usr/local/lib/python3.10/dist-packages/pandas/io/json/_json.py in _parse_no_numpy(self) 1319 if orient == "columns": 1320 self.obj = DataFrame( -> 1321 loads(json, precise_float=self.precise_float), dtype=None 1322 ) 1323…

VIEW QUESTION

Docker – Connecting to PostgreSQL Cointainer Database with Airflow DAG

I have issue with connecting to airflow database I can do it locally with such code import pandas as pd from sqlalchemy import create_engine import os df = pd.read_csv('wynik_zgloszenia.csv', sep = '#') engine = create_engine(f'postgresql+psycopg2://postgres:mysecretpassword@localhost:8001/postgres',client_encoding='utf8') df.to_sql('permissions', engine, index=False, if_exists='replace') I…

VIEW QUESTION

Broken Json file in python when decoding

I am making a mod manager which opens the mods manifest.json file for name, description, version and dependencies although when its reading the file... i think ill just show you: MANIFEST FILE: { "name": "HookGenPatcher", "version_number": "0.0.5", "website_url": "https://github.com/harbingerofme/Bepinex.Monomod.HookGenPatcher", "description":…

VIEW QUESTION

getting data from JSON in Python

I am trying to isolate several variables from a JSON file I have taken from https://api.weatherapi.com/v1/forecast.json?q='s-Hertogenbosch&days=3&alerts=yes&aqi=yes&key=X Key removed for safety reasons. Therefore I use the following code: import json response = urlopen(url) weer_data = json.loads(response.read()) location = weer_data['location']['name'] temp_current =…

VIEW QUESTION
Back To Top
Search