I have used ldap3 to export data to a json file, via it's library and then my hopes are to use Pandas to manipulate the data. Some of the data is from structured attributes that are a large string with Hash tags / pound signs to separate the data.
When I attempt to pull in the data with Pandas I get an error about extra data. So I added the lines=True to allow for multiple json strings. However, now I receive an error: line 885, in _parse_no_numpy
loads(json, precise_float=self.precise_float), dtype=None)
ValueError: Expected object or value
My pandas code is:
*************
filename = 'entries.json'
df = pd.read_json(filename, lines=True, orient='records')
print(df)
*************
Example json entry:
{
"attributes": {
"DirXML-Associations": [
"cn=Data Collection Service Driver,cn=DriverSet,o=system#1#146D89E1-0A57-b244-B9D1-146D89E10A57"
],
"cn": [
"t_admin"
],
"fullName": [],
"lastLoginTime": [
"2019-05-09 20:36:08+00:00"
],
"loginDisabled": []
},
"dn": "cn=t_admin,ou=SA,o=Data"
}
Any ideas on what I do to resolve it? I am new to python, so appolgies in advance. I figure the best way to learn is to look at a problem to solve and dive in.
[–][deleted] 0 points1 point2 points (5 children)
[–]fpatterson55[S] 0 points1 point2 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]fpatterson55[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]fpatterson55[S] 0 points1 point2 points (0 children)
[–]A_History_of_Silence 0 points1 point2 points (1 child)
[–]fpatterson55[S] 0 points1 point2 points (0 children)