glassonion1 / anonypy

Anonymization library for python. Protect the privacy of individuals.
MIT License
25 stars 10 forks source link

Update anonypy.py to handle df instead of series for the ".to_dict()" function. #4

Closed tzuV closed 3 months ago

tzuV commented 3 months ago

I had some problems trying running the code. When i tried to execute the example code, i got the error: "AttributeError: 'list' object has no attribute 'to_dict'"

I then added the code: "grouped_columns = pd.DataFrame(grouped_columns.tolist(), index=grouped_columns.index).T" A little work around, but the code act as expected now and gives the same output as in the example shown in the repo.

glassonion1 commented 3 months ago

Thanks for your pull request. I checked the code and found that there were no problems, so I merged it.