background : Need to use pandas.read_json() Read a Local json File to dataframe, However, there is an error message :valueerror expected object or value
bing I searched for it , The answer is very accurate ( When can baidu do the same …)
In fact, that is pd.read_json(path_or_buf=path, orient='columns')
This one in path Something went wrong. .
I tried to be direct pd.read_json(path_or_buf=r'E:\xxx\xxx\xx.json', orient='columns')
It can read data , Then it must be lack of this again r
As a result of .
Because my folder path and file name are stored in two variables respectively , So it can be handled like this :
# folder_path -- Folder path
# file_name -- File name
vpath = r"".join([folder_path, os.sep, file_name])
pd.read_json(path_or_buf=vpath,orient='columns')
Get it done *,°:.*( ̄▽ ̄)/$:.°* .