milcent / benford_py

Python implementation of Benford's Law tests.
BSD 3-Clause "New" or "Revised" License
151 stars 52 forks source link

summation() unexpected kwarg 'verbose' #49

Closed HappyCane closed 3 years ago

HappyCane commented 3 years ago

Hello, I get this error with the summation() which resembles the closed issue a fellow member had with mad(). Unfortunately, I can't find a way around it.

--Code--

Initialized sequence with 1452 registries.


TypeError Traceback (most recent call last)

in () 1 #Summation ----> 2 bf.summation(rev['Revenues'],digs=2,show_plot=True) /usr/local/lib/python3.6/dist-packages/benford/benford.py in summation(data, digs, decimals, sign, top, verbose, show_plot, save_plot, save_plot_kwargs, inform) 1554 show_plot=show_plot, save_plot=save_plot, 1555 save_plot_kwargs=save_plot_kwargs, ret_df=True) -> 1556 if verbose == True: 1557 return data.sort_values('AbsDif', ascending=False) 1558 else: TypeError: summation() got an unexpected keyword argument 'verbose'
milcent commented 3 years ago

Thanks for posting. What is you version of the package? The latest?

HappyCane commented 3 years ago

Yes! I run it from google colab so I download the last version each time

milcent commented 3 years ago

OK. I will check it out.

milcent commented 3 years ago

I think I have fixed it, but am still going to run some tests in the same function and in the more recent parts of the library. While I don't release another version with the bugfix, you should be able to install it in Colab directly from github, with the command below: pip install git+https://github.com/milcent/benford_py.git@hotfix/summ_verbose Let me now if it works. Cheers, Milcent

HappyCane commented 3 years ago

Yep it works thank you! You do a very good job sir !

milcent commented 3 years ago

I have merged it into master, so the pip comand below should also work: pip install git+https://github.com/milcent/benford_py.git@master

milcent commented 3 years ago

It is now in v0.3.3 (latest)

milcent commented 3 years ago

Might I ask (if you can disclose it) in what field are you using the package and how the summation test, or any other, for that matter, is helping you?

Em sáb., 23 de jan. de 2021 às 16:52, Harry Kapnas notifications@github.com escreveu:

Yep it works thank you! You do a very good job sir !

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/milcent/benford_py/issues/49#issuecomment-766169193, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQTJ47LQK3MPAJCRUIRBP3S3MSJBANCNFSM4WPTKSNQ .

HappyCane commented 3 years ago

I work as an auditor and I'm experimenting on automated auditing techniques. I find your package very useful whenever I manage to get enough data for the algorithm to be effective.

milcent commented 3 years ago

Thanks for sharing.

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Livre de vírus. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail. <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

Em dom., 24 de jan. de 2021 às 15:08, Harry Kapnas notifications@github.com escreveu:

I work as an auditor and I'm experimenting on automated auditing techniques. I find your package very useful whenever I manage to get enough data for the algorithm to be effective.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/milcent/benford_py/issues/49#issuecomment-766405050, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQTJ434RIV56WGSLTXBS53S3RO2HANCNFSM4WPTKSNQ .