Forums

Groupby Max

I'm trying to do a max of 4 columns group by other 2. While it is workig fine if I give individual commands in Console, it is not working when executed from the python file. It is just returning an Empty Data Frame. Any clues would be helpful.

PS. It was working fine last week.

Hmm, there are a number of possibilities:

  • Are you sure you're using the same Python version in both cases? When you run something from the editor, your account is set up to use Python 3.6. Is the console you're running things from using the same version?
  • You mention a data frame, I assume you're using Pandas...? If so, are you sure you're loading the same data in both cases? If you're loading it from a file using a filename like "mydata.txt", then it's possible that it's loading from a different file in each case, because a filename like that would be resolved relative to the directory where the code is running.

If neither of those apply, could you give a little more information?