skip to Main Content

Merge dataframes having array – SEO

I have two data frames. DF1 isActive,trackedSearchId True,53436615 True,53434228 True,53434229 DF2 trackedSearchIds,Primary Keyword Group(s) "[53436613, 53436615, 53437436, 53436506]",SEO - Directory-Deployment "[53435887, 53437509, 53437441, 53436615, 53438685, 53437636]",SEO - Other-Glossary "[53437504, 53435090, 53435887, 53434228]",SEO - Other "[53437504, 53435090, 53434229]",SEO - Glossary I…

VIEW QUESTION

Python: json_normalize gives AttributeError for list of dict values

I have a pandas dataframe where 2 columns are nested column having decimal value: df.tail(1).to_dict('list') gives this kind of data {'nested_col1': [array([{'key1': 'CO', 'key2': Decimal('8.940000000')}], dtype=object)], 'nested_col2': [array([{'key3': 'CO', 'key4': 'P14', 'key5': Decimal('8.940000000'), 'key6': None}], dtype=object)]} I am trying to…

VIEW QUESTION

Converting Json to pd

I'm trying to convert the Json type data to dataframe. I extrated data from following webpage with following code. webpage I extract data import pandas as pd import requests import json url = r'https://www.hkex.com.hk/eng/csm/MonthlyStat/data_tab_monthly_202302e.js?_=1' response = requests.get(url) if response.status_code !=…

VIEW QUESTION
Back To Top
Search