result = df.groupby(['Class', 'Age', 'City', 'Color']).size().reset_index(name='Count')
print(result)
Выход
Class Age City Color Count
0 A 20 Los Angeles Blue 2
1 A 20 Los Angeles Red 1
2 B 25 Phoenix Yellow 1
Согласно FAQ , преобразование из непокрытого в голое может быть сделано двумя способами. Лучший из них:
$ git clone --bare -l repo repo.git
$ rm -rf repo
Чтобы создать пустой репозиторий с нуля:
$ mkdir repo.git
$ cd repo.git
$ git --bare init
Just move the .git
folder away from the working copy.
mv /var/git/repo/repo/.git /var/git/repos/repo.git
You might want to follow that up with a
git config --bool core.bare true
in that repository, just in case git
complains about something not being right.
git clone --bare repo
This will give you a new bare version of repo
named repo.git
. Easy, no?