Try
ser = pd.read_json('people_wiki_map_index_to_word.json', typ='series')
That file only contains key value pairs where values are scalars. You can convert it to a dataframe with ser.to_frame('count')
.
You can also do something like this:
import json with open('people_wiki_map_index_to_word.json', 'r') as f: data = json.load(f)
Now data is a dictionary. You can pass it to a dataframe constructor like this:
df = pd.DataFrame({'count': data})
Related Posts:
- JSON to pandas DataFrame
- Loading a file with more than one line of JSON into Pandas
- ValueError: Expected object or value when reading json as pandas dataframe
- how to sort pandas dataframe from one column
- Why am I seeing “TypeError: string indices must be integers”?
- How to prettyprint a JSON file?
- How to reset index in a pandas dataframe? [duplicate]
- How to iterate over rows in a DataFrame in Pandas
- How to iterate over rows in a DataFrame in Pandas
- Writing a pandas DataFrame to CSV file
- Adding new column to existing DataFrame in Python pandas
- ImportError: No module named pandas
- How to change the order of DataFrame columns?
- ImportError: No module named pandas. Pandas installed pip
- How can I use the apply() function for a single column?
- Convenient way to deal with ValueError: cannot reindex from a duplicate axis
- “Series objects are mutable and cannot be hashed” error
- Merging dataframes on index with pandas
- How to parse data in JSON format?
- How to replace NaN values by Zeroes in a column of a Pandas Dataframe?
- Convert Python dict into a dataframe
- re.sub erroring with “Expected string or bytes-like object”
- How do I select rows from a DataFrame based on column values?
- DataFrame constructor not properly called! error
- Pandas group-by and sum
- Python pandas groupby aggregate on multiple columns, then pivot
- Error”Can only compare identically-labeled Series objects” and sort_index
- How do I get the row count of a Pandas DataFrame?
- Python Pandas – Missing required dependencies [‘numpy’] 1
- Get list from pandas dataframe column or row?
- pandas DataFrame “no numeric data to plot” error
- pandas: filter rows of DataFrame with operator chaining
- ‘DataFrame’ object has no attribute ‘sort’
- Pandas how to use pd.cut()
- How to Read .txt in Pandas
- Get total of Pandas column
- Type error: cannot convert the series to
- TypeError: ‘DataFrame’ object is not callable
- How to check whether a pandas DataFrame is empty?
- Convert columns to string in Pandas
- Change column type in pandas
- Shuffle DataFrame rows
- How to POST JSON data with Python Requests?
- AttributeError: Can only use .dt accessor with datetimelike values
- Python: pandas merge multiple dataframes
- How to load a tsv file into a Pandas DataFrame?
- How to count the NaN values in a column in pandas DataFrame
- xlrd.biffh.XLRDError: Excel xlsx file; not supported
- Python/Json:Expecting property name enclosed in double quotes
- Displaying better error message than “No JSON object could be decoded”
- Pandas – DataFrame object is not callable
- Python error load JSON code of google API
- Convert pandas data frame to series
- How do I combine two dataframes?
- Normalize columns of pandas data frame
- Converting strings to floats in a DataFrame
- Get first row value of a given column
- Normalize columns of pandas data frame
- How to filter Pandas dataframe using ‘in’ and ‘not in’ like in SQL
- How to add an empty column to a dataframe?
- Pandas join issue: columns overlap but no suffix specified
- How to apply a function to two columns of Pandas dataframe
- Convert categorical data in pandas dataframe
- How to get JSON from webpage into Python script
- pandas create new column based on values from other columns / apply a function of multiple columns, row-wise
- SettingWithCopyWarning even when using .loc[row_indexer,col_indexer] = value
- OSError: Initializing from file failed on csv in Pandas
- AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas
- Insert a row to pandas dataframe
- Python Pandas ValueError Arrays Must be All Same Length
- How to save a Seaborn plot into a file
- Subtract two columns in dataframe
- pandas DataFrame: replace nan values with average of columns
- Pandas error “Can only use .str accessor with string values”
- How to get row number in dataframe in Pandas?
- Rename specific column(s) in pandas
- How to convert column with dtype as object to string in Pandas Dataframe
- Coalesce values from 2 columns into a single column in a pandas dataframe
- Unknown format code ‘f’ for object of type ‘str’- Folium
- how to read json object in python
- Pandas: sum up multiple columns into one column without last column
- python pandas remove duplicate columns
- How to prettyprint a JSON file?
- Convert Pandas Column to DateTime
- Concat DataFrame Reindexing only valid with uniquely valued Index objects
- Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
- Move column by name to front of table in pandas
- Pandas unstack problems: ValueError: Index contains duplicate entries, cannot reshape
- Python: Convert timedelta to int in a dataframe
- Must have equal len keys and value when setting with an iterable
- Pandas dataframe groupby plot
- set object is not JSON serializable
- dump() missing 1 required positional argument: ‘fp’ in python json
- Calculate weighted average using a pandas/dataframe
- ValueError: multiclass format is not supported
- How to convert .sav file into csv file
- How to get POSTed JSON in Flask?
- Convert list of dictionaries to a pandas DataFrame
- Python Pandas : pivot table with aggfunc = count unique distinct
- AttributeError: ‘Series’ object has no attribute ‘split’ error in sending emails