Shuffle DataFrame rows

The idiomatic way to do this with Pandas is to use the .sample method of your dataframe to sample all rows without replacement: The frac keyword argument specifies the fraction of rows to return in the random sample, so frac=1 means return all rows (in random order). Note: If you wish to shuffle your dataframe in-place and reset the index, you could … Read more

Using a comparator function to sort

You’re passing the comparator as the key function. You should be passing it as the cmp, wrapped in some kind of function that turns it into a proper comparator. (Although actually, you should be using key functions: Also note that sortedDict will not actually be a dict, so the name is rather confusing.)

How to use pyinstaller?

I would suggest to first read the Using Pyinstaller section in the documentation of the module itself. You can also use some tutorials (e.g. Matt Borgerson’s one). In order to recap you should: write your script and make sure that it works run from the command line:~\ pyinstaller your_file_name.py this command will generate a your_file_name.spec file where you can include all the dll required … Read more