{ "cells": [ { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletionsfilenameauthor
123pom.xmlDave Syer
311readme.mdAntoine Rey
510pom.xmlAntoine Rey
711pom.xmlStephane Nicoll
8119src/main/java/org/springframework/samples/petc...Stephane Nicoll
\n", "
" ], "text/plain": [ " additions deletions filename \\\n", "1 2 3 pom.xml \n", "3 1 1 readme.md \n", "5 1 0 pom.xml \n", "7 1 1 pom.xml \n", "8 11 9 src/main/java/org/springframework/samples/petc... \n", "\n", " author \n", "1 Dave Syer \n", "3 Antoine Rey \n", "5 Antoine Rey \n", "7 Stephane Nicoll \n", "8 Stephane Nicoll " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "\n", "git_log = pd.read_csv(\n", " \"../../../spring-petclinic/git_knowledge.log\",\n", " names=['additions', 'deletions', 'filename', 'author'],\n", " sep='\\t')\n", "git_log['author'] = git_log['author'].ffill()\n", "git_log = git_log.dropna()\n", "git_log.head()" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletionsfilenameauthor
4185032.classpathMichael Isvy
450105.classpathMichael Isvy
4669286.classpathMichael Isvy
477622.classpathRossen Stoyanchev
4859836.classpathKeith Donald
5094430.classpathCostin Leau
\n", "
" ], "text/plain": [ " additions deletions filename author\n", "4185 0 32 .classpath Michael Isvy\n", "4501 0 5 .classpath Michael Isvy\n", "4669 28 6 .classpath Michael Isvy\n", "4776 2 2 .classpath Rossen Stoyanchev\n", "4859 8 36 .classpath Keith Donald\n", "5094 43 0 .classpath Costin Leau" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "git_log[git_log['filename'] == \".classpath\"]" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletionsfilenameauthor
36203.bowerrcDapeng
188811.bowerrcAntoine Rey
297130.bowerrcFaycal Ihabritane
\n", "
" ], "text/plain": [ " additions deletions filename author\n", "362 0 3 .bowerrc Dapeng\n", "1888 1 1 .bowerrc Antoine Rey\n", "2971 3 0 .bowerrc Faycal Ihabritane" ] }, "execution_count": 40, "metadata": {}, "output_type": "execute_result" } ], "source": [ "git_log[git_log['filename'] == \".bowerrc\"]\n" ] }, { "cell_type": "code", "execution_count": 53, "metadata": { "collapsed": true }, "outputs": [], "source": [ "pd.DataFrame.var?" ] }, { "cell_type": "code", "execution_count": 90, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "filename\n", ".bowerrc 3\n", ".classpath 6\n", ".editorconfig 2\n", ".gitignore 8\n", ".mvn/wrapper/maven-wrapper.jar 1\n", ".mvn/wrapper/maven-wrapper.properties 1\n", ".project 5\n", ".settings/.jsdtscope 3\n", ".settings/com.springsource.server.ide.jdt.core.xml 2\n", ".settings/org.eclipse.jdt.core.prefs 3\n", ".settings/org.eclipse.jst.common.project.facet.core.prefs 2\n", ".settings/org.eclipse.m2e.core.prefs 2\n", ".settings/org.eclipse.m2e.wtp.prefs 2\n", ".settings/org.eclipse.wst.common.component 5\n", ".settings/org.eclipse.wst.common.project.facet.core.xml 3\n", ".settings/org.eclipse.wst.jsdt.ui.superType.container 2\n", ".settings/org.eclipse.wst.jsdt.ui.superType.name 2\n", ".settings/org.eclipse.wst.validation.prefs 2\n", ".settings/org.maven.ide.eclipse.prefs 2\n", ".settings/org.springframework.ide.eclipse.beans.core.prefs 2\n", ".settings/org.springframework.ide.eclipse.core.prefs 3\n", ".springBeans 14\n", ".travis.yml 2\n", "README.md 2\n", "authors.txt 2\n", "bower.json 3\n", "db/build.xml 2\n", "db/dropTables.txt 2\n", "db/emptyDB.txt 2\n", "db/mysql/createDB.txt 2\n", " ..\n", "src/test/java/org/springframework/samples/petclinic/vet/VetControllerTests.java 1\n", "src/test/java/org/springframework/samples/petclinic/vet/VetTests.java 1\n", "src/test/java/org/springframework/samples/petclinic/web/CrashControllerTests.java 6\n", "src/test/java/org/springframework/samples/petclinic/web/OwnerControllerTests.java 9\n", "src/test/java/org/springframework/samples/petclinic/web/PetControllerTests.java 9\n", "src/test/java/org/springframework/samples/petclinic/web/PetTypeFormatterTests.java 2\n", "src/test/java/org/springframework/samples/petclinic/web/VetControllerTest.java 2\n", "src/test/java/org/springframework/samples/petclinic/web/VetControllerTests.java 15\n", "src/test/java/org/springframework/samples/petclinic/web/VisitControllerTests.java 10\n", "src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewTest.java 10\n", "src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewTestWithContainer-config.xml 3\n", "src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewWithContainerTest.java 3\n", "src/test/java/org/springframework/samples/petclinic/web/VisitsViewTest-config.xml 3\n", "src/test/java/org/springframework/samples/petclinic/web/VisitsViewTest.java 4\n", "src/test/java/org/springframework/samples/petclinic/web/VisitsViewTests-config.xml 2\n", "src/test/java/org/springframework/samples/petclinic/web/VisitsViewTests.java 5\n", "src/test/jmeter/petclinic_test_plan.jmx 4\n", "src/test/resources/log4j.xml 2\n", "src/test/resources/logback-test.xml 3\n", "src/test/resources/org/springframework/samples/petclinic/AbstractClinicTests-context.xml 5\n", "src/test/resources/org/springframework/samples/petclinic/hibernate/HibernateClinicTests-context.xml 3\n", "src/test/resources/org/springframework/samples/petclinic/jdbc/JdbcClinicTests-context.xml 2\n", "src/test/resources/org/springframework/samples/petclinic/jdbc/SimpleJdbcClinicTests-context.xml 2\n", "src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-entityManager.xml 3\n", "src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-hibernateAdapter.xml 2\n", "src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml 5\n", "src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-openJpaAdapter.xml 2\n", "src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-toplinkAdapter.xml 2\n", "src/test/resources/spring/mvc-test-config.xml 1\n", "travis.yml 2\n", "Name: author, Length: 1674, dtype: int64" ] }, "execution_count": 90, "metadata": {}, "output_type": "execute_result" } ], "source": [ "git_log['aid'] = pd.factorize(git_log.author)[0]\n", "gs = git_log.groupby('filename')['author']\n", "# pd.DataFrame(gs.ndim() / gs.count())\n", "gs." ] }, { "cell_type": "code", "execution_count": 70, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletionsfilenameauthoraid
36203.bowerrcDapeng7
188811.bowerrcAntoine Rey1
297130.bowerrcFaycal Ihabritane21
\n", "
" ], "text/plain": [ " additions deletions filename author aid\n", "362 0 3 .bowerrc Dapeng 7\n", "1888 1 1 .bowerrc Antoine Rey 1\n", "2971 3 0 .bowerrc Faycal Ihabritane 21" ] }, "execution_count": 70, "metadata": {}, "output_type": "execute_result" } ], "source": [ "git_log[git_log['filename'] == \".bowerrc\"]" ] }, { "cell_type": "code", "execution_count": 79, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletionsfilenameauthoraid
302352.editorconfigAntoine Rey1
302890.editorconfigAntoine Rey1
\n", "
" ], "text/plain": [ " additions deletions filename author aid\n", "3023 5 2 .editorconfig Antoine Rey 1\n", "3028 9 0 .editorconfig Antoine Rey 1" ] }, "execution_count": 79, "metadata": {}, "output_type": "execute_result" } ], "source": [ "git_log[git_log['filename'] == \".editorconfig\"]" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletionsfilenameauthor
6610.gitignoreDave Syer
35820.gitignoreAntoine Rey
186201.gitignorePatrick Crocker
187910.gitignoreAntoine Rey
344021.gitignoreCyrille Le Clerc
351910.gitignoreMichael Isvy
418610.gitignoreMichael Isvy
466740.gitignoreMichael Isvy
\n", "
" ], "text/plain": [ " additions deletions filename author\n", "66 1 0 .gitignore Dave Syer\n", "358 2 0 .gitignore Antoine Rey\n", "1862 0 1 .gitignore Patrick Crocker\n", "1879 1 0 .gitignore Antoine Rey\n", "3440 2 1 .gitignore Cyrille Le Clerc\n", "3519 1 0 .gitignore Michael Isvy\n", "4186 1 0 .gitignore Michael Isvy\n", "4667 4 0 .gitignore Michael Isvy" ] }, "execution_count": 42, "metadata": {}, "output_type": "execute_result" } ], "source": [ "git_log[git_log['filename'] == \".gitignore\"]" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletions
filename
.bowerrc0.0000000.000000
.classpath1.0000001.000000
.editorconfigNaNNaN
.gitignore0.8000000.800000
.mvn/wrapper/maven-wrapper.jarNaNNaN
.mvn/wrapper/maven-wrapper.propertiesNaNNaN
.project0.2500000.250000
.settings/.jsdtscope0.5000000.500000
.settings/com.springsource.server.ide.jdt.core.xml0.0000000.000000
.settings/org.eclipse.jdt.core.prefs0.5000000.500000
.settings/org.eclipse.jst.common.project.facet.core.prefs0.0000000.000000
.settings/org.eclipse.m2e.core.prefsNaNNaN
.settings/org.eclipse.m2e.wtp.prefsNaNNaN
.settings/org.eclipse.wst.common.component0.3333330.333333
.settings/org.eclipse.wst.common.project.facet.core.xml0.5000000.500000
.settings/org.eclipse.wst.jsdt.ui.superType.container0.0000000.000000
.settings/org.eclipse.wst.jsdt.ui.superType.name0.0000000.000000
.settings/org.eclipse.wst.validation.prefs0.0000000.000000
.settings/org.maven.ide.eclipse.prefs0.0000000.000000
.settings/org.springframework.ide.eclipse.beans.core.prefs0.0000000.000000
.settings/org.springframework.ide.eclipse.core.prefs0.5000000.500000
.springBeans50.00000050.000000
.travis.yml0.0000000.000000
README.mdNaNNaN
authors.txtNaNNaN
bower.json0.0000000.000000
db/build.xmlNaNNaN
db/dropTables.txtNaNNaN
db/emptyDB.txtNaNNaN
db/mysql/createDB.txtNaNNaN
.........
src/test/java/org/springframework/samples/petclinic/vet/VetControllerTests.javaNaNNaN
src/test/java/org/springframework/samples/petclinic/vet/VetTests.javaNaNNaN
src/test/java/org/springframework/samples/petclinic/web/CrashControllerTests.java3.0000003.000000
src/test/java/org/springframework/samples/petclinic/web/OwnerControllerTests.java12.00000012.000000
src/test/java/org/springframework/samples/petclinic/web/PetControllerTests.java12.00000012.000000
src/test/java/org/springframework/samples/petclinic/web/PetTypeFormatterTests.java0.0000000.000000
src/test/java/org/springframework/samples/petclinic/web/VetControllerTest.javaNaNNaN
src/test/java/org/springframework/samples/petclinic/web/VetControllerTests.java20.00000020.000000
src/test/java/org/springframework/samples/petclinic/web/VisitControllerTests.java10.33333310.333333
src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewTest.java16.33333316.333333
src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewTestWithContainer-config.xml0.5000000.500000
src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewWithContainerTest.java0.5000000.500000
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTest-config.xmlNaNNaN
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTest.javaNaNNaN
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTests-config.xmlNaNNaN
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTests.javaNaNNaN
src/test/jmeter/petclinic_test_plan.jmx2.0000002.000000
src/test/resources/log4j.xml0.0000000.000000
src/test/resources/logback-test.xml0.5000000.500000
src/test/resources/org/springframework/samples/petclinic/AbstractClinicTests-context.xml0.2500000.250000
src/test/resources/org/springframework/samples/petclinic/hibernate/HibernateClinicTests-context.xml0.5000000.500000
src/test/resources/org/springframework/samples/petclinic/jdbc/JdbcClinicTests-context.xmlNaNNaN
src/test/resources/org/springframework/samples/petclinic/jdbc/SimpleJdbcClinicTests-context.xml0.0000000.000000
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-entityManager.xml0.5000000.500000
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-hibernateAdapter.xml0.0000000.000000
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml0.2500000.250000
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-openJpaAdapter.xml0.0000000.000000
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-toplinkAdapter.xml0.0000000.000000
src/test/resources/spring/mvc-test-config.xmlNaNNaN
travis.ymlNaNNaN
\n", "

1674 rows × 2 columns

\n", "
" ], "text/plain": [ " additions deletions\n", "filename \n", ".bowerrc 0.000000 0.000000\n", ".classpath 1.000000 1.000000\n", ".editorconfig NaN NaN\n", ".gitignore 0.800000 0.800000\n", ".mvn/wrapper/maven-wrapper.jar NaN NaN\n", ".mvn/wrapper/maven-wrapper.properties NaN NaN\n", ".project 0.250000 0.250000\n", ".settings/.jsdtscope 0.500000 0.500000\n", ".settings/com.springsource.server.ide.jdt.core.xml 0.000000 0.000000\n", ".settings/org.eclipse.jdt.core.prefs 0.500000 0.500000\n", ".settings/org.eclipse.jst.common.project.facet.... 0.000000 0.000000\n", ".settings/org.eclipse.m2e.core.prefs NaN NaN\n", ".settings/org.eclipse.m2e.wtp.prefs NaN NaN\n", ".settings/org.eclipse.wst.common.component 0.333333 0.333333\n", ".settings/org.eclipse.wst.common.project.facet.... 0.500000 0.500000\n", ".settings/org.eclipse.wst.jsdt.ui.superType.con... 0.000000 0.000000\n", ".settings/org.eclipse.wst.jsdt.ui.superType.name 0.000000 0.000000\n", ".settings/org.eclipse.wst.validation.prefs 0.000000 0.000000\n", ".settings/org.maven.ide.eclipse.prefs 0.000000 0.000000\n", ".settings/org.springframework.ide.eclipse.beans... 0.000000 0.000000\n", ".settings/org.springframework.ide.eclipse.core.... 0.500000 0.500000\n", ".springBeans 50.000000 50.000000\n", ".travis.yml 0.000000 0.000000\n", "README.md NaN NaN\n", "authors.txt NaN NaN\n", "bower.json 0.000000 0.000000\n", "db/build.xml NaN NaN\n", "db/dropTables.txt NaN NaN\n", "db/emptyDB.txt NaN NaN\n", "db/mysql/createDB.txt NaN NaN\n", "... ... ...\n", "src/test/java/org/springframework/samples/petcl... NaN NaN\n", "src/test/java/org/springframework/samples/petcl... NaN NaN\n", "src/test/java/org/springframework/samples/petcl... 3.000000 3.000000\n", "src/test/java/org/springframework/samples/petcl... 12.000000 12.000000\n", "src/test/java/org/springframework/samples/petcl... 12.000000 12.000000\n", "src/test/java/org/springframework/samples/petcl... 0.000000 0.000000\n", "src/test/java/org/springframework/samples/petcl... NaN NaN\n", "src/test/java/org/springframework/samples/petcl... 20.000000 20.000000\n", "src/test/java/org/springframework/samples/petcl... 10.333333 10.333333\n", "src/test/java/org/springframework/samples/petcl... 16.333333 16.333333\n", "src/test/java/org/springframework/samples/petcl... 0.500000 0.500000\n", "src/test/java/org/springframework/samples/petcl... 0.500000 0.500000\n", "src/test/java/org/springframework/samples/petcl... NaN NaN\n", "src/test/java/org/springframework/samples/petcl... NaN NaN\n", "src/test/java/org/springframework/samples/petcl... NaN NaN\n", "src/test/java/org/springframework/samples/petcl... NaN NaN\n", "src/test/jmeter/petclinic_test_plan.jmx 2.000000 2.000000\n", "src/test/resources/log4j.xml 0.000000 0.000000\n", "src/test/resources/logback-test.xml 0.500000 0.500000\n", "src/test/resources/org/springframework/samples/... 0.250000 0.250000\n", "src/test/resources/org/springframework/samples/... 0.500000 0.500000\n", "src/test/resources/org/springframework/samples/... NaN NaN\n", "src/test/resources/org/springframework/samples/... 0.000000 0.000000\n", "src/test/resources/org/springframework/samples/... 0.500000 0.500000\n", "src/test/resources/org/springframework/samples/... 0.000000 0.000000\n", "src/test/resources/org/springframework/samples/... 0.250000 0.250000\n", "src/test/resources/org/springframework/samples/... 0.000000 0.000000\n", "src/test/resources/org/springframework/samples/... 0.000000 0.000000\n", "src/test/resources/spring/mvc-test-config.xml NaN NaN\n", "travis.yml NaN NaN\n", "\n", "[1674 rows x 2 columns]" ] }, "execution_count": 38, "metadata": {}, "output_type": "execute_result" } ], "source": [ "gb = git_log.groupby(['filename', 'author']).count()\n", "gb.groupby(gb.index.get_level_values(0)).var()" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
additionsdeletions
filename
.bowerrc33
.classpath66
.editorconfig22
.gitignore88
.mvn/wrapper/maven-wrapper.jar11
.mvn/wrapper/maven-wrapper.properties11
.project55
.settings/.jsdtscope33
.settings/com.springsource.server.ide.jdt.core.xml22
.settings/org.eclipse.jdt.core.prefs33
.settings/org.eclipse.jst.common.project.facet.core.prefs22
.settings/org.eclipse.m2e.core.prefs22
.settings/org.eclipse.m2e.wtp.prefs22
.settings/org.eclipse.wst.common.component55
.settings/org.eclipse.wst.common.project.facet.core.xml33
.settings/org.eclipse.wst.jsdt.ui.superType.container22
.settings/org.eclipse.wst.jsdt.ui.superType.name22
.settings/org.eclipse.wst.validation.prefs22
.settings/org.maven.ide.eclipse.prefs22
.settings/org.springframework.ide.eclipse.beans.core.prefs22
.settings/org.springframework.ide.eclipse.core.prefs33
.springBeans1414
.travis.yml22
README.md22
authors.txt22
bower.json33
db/build.xml22
db/dropTables.txt22
db/emptyDB.txt22
db/mysql/createDB.txt22
.........
src/test/java/org/springframework/samples/petclinic/vet/VetControllerTests.java11
src/test/java/org/springframework/samples/petclinic/vet/VetTests.java11
src/test/java/org/springframework/samples/petclinic/web/CrashControllerTests.java66
src/test/java/org/springframework/samples/petclinic/web/OwnerControllerTests.java99
src/test/java/org/springframework/samples/petclinic/web/PetControllerTests.java99
src/test/java/org/springframework/samples/petclinic/web/PetTypeFormatterTests.java22
src/test/java/org/springframework/samples/petclinic/web/VetControllerTest.java22
src/test/java/org/springframework/samples/petclinic/web/VetControllerTests.java1515
src/test/java/org/springframework/samples/petclinic/web/VisitControllerTests.java1010
src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewTest.java1010
src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewTestWithContainer-config.xml33
src/test/java/org/springframework/samples/petclinic/web/VisitsAtomViewWithContainerTest.java33
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTest-config.xml33
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTest.java44
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTests-config.xml22
src/test/java/org/springframework/samples/petclinic/web/VisitsViewTests.java55
src/test/jmeter/petclinic_test_plan.jmx44
src/test/resources/log4j.xml22
src/test/resources/logback-test.xml33
src/test/resources/org/springframework/samples/petclinic/AbstractClinicTests-context.xml55
src/test/resources/org/springframework/samples/petclinic/hibernate/HibernateClinicTests-context.xml33
src/test/resources/org/springframework/samples/petclinic/jdbc/JdbcClinicTests-context.xml22
src/test/resources/org/springframework/samples/petclinic/jdbc/SimpleJdbcClinicTests-context.xml22
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-entityManager.xml33
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-hibernateAdapter.xml22
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-jpaCommon.xml55
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-openJpaAdapter.xml22
src/test/resources/org/springframework/samples/petclinic/jpa/applicationContext-toplinkAdapter.xml22
src/test/resources/spring/mvc-test-config.xml11
travis.yml22
\n", "

1674 rows × 2 columns

\n", "
" ], "text/plain": [ " additions deletions\n", "filename \n", ".bowerrc 3 3\n", ".classpath 6 6\n", ".editorconfig 2 2\n", ".gitignore 8 8\n", ".mvn/wrapper/maven-wrapper.jar 1 1\n", ".mvn/wrapper/maven-wrapper.properties 1 1\n", ".project 5 5\n", ".settings/.jsdtscope 3 3\n", ".settings/com.springsource.server.ide.jdt.core.xml 2 2\n", ".settings/org.eclipse.jdt.core.prefs 3 3\n", ".settings/org.eclipse.jst.common.project.facet.... 2 2\n", ".settings/org.eclipse.m2e.core.prefs 2 2\n", ".settings/org.eclipse.m2e.wtp.prefs 2 2\n", ".settings/org.eclipse.wst.common.component 5 5\n", ".settings/org.eclipse.wst.common.project.facet.... 3 3\n", ".settings/org.eclipse.wst.jsdt.ui.superType.con... 2 2\n", ".settings/org.eclipse.wst.jsdt.ui.superType.name 2 2\n", ".settings/org.eclipse.wst.validation.prefs 2 2\n", ".settings/org.maven.ide.eclipse.prefs 2 2\n", ".settings/org.springframework.ide.eclipse.beans... 2 2\n", ".settings/org.springframework.ide.eclipse.core.... 3 3\n", ".springBeans 14 14\n", ".travis.yml 2 2\n", "README.md 2 2\n", "authors.txt 2 2\n", "bower.json 3 3\n", "db/build.xml 2 2\n", "db/dropTables.txt 2 2\n", "db/emptyDB.txt 2 2\n", "db/mysql/createDB.txt 2 2\n", "... ... ...\n", "src/test/java/org/springframework/samples/petcl... 1 1\n", "src/test/java/org/springframework/samples/petcl... 1 1\n", "src/test/java/org/springframework/samples/petcl... 6 6\n", "src/test/java/org/springframework/samples/petcl... 9 9\n", "src/test/java/org/springframework/samples/petcl... 9 9\n", "src/test/java/org/springframework/samples/petcl... 2 2\n", "src/test/java/org/springframework/samples/petcl... 2 2\n", "src/test/java/org/springframework/samples/petcl... 15 15\n", "src/test/java/org/springframework/samples/petcl... 10 10\n", "src/test/java/org/springframework/samples/petcl... 10 10\n", "src/test/java/org/springframework/samples/petcl... 3 3\n", "src/test/java/org/springframework/samples/petcl... 3 3\n", "src/test/java/org/springframework/samples/petcl... 3 3\n", "src/test/java/org/springframework/samples/petcl... 4 4\n", "src/test/java/org/springframework/samples/petcl... 2 2\n", "src/test/java/org/springframework/samples/petcl... 5 5\n", "src/test/jmeter/petclinic_test_plan.jmx 4 4\n", "src/test/resources/log4j.xml 2 2\n", "src/test/resources/logback-test.xml 3 3\n", "src/test/resources/org/springframework/samples/... 5 5\n", "src/test/resources/org/springframework/samples/... 3 3\n", "src/test/resources/org/springframework/samples/... 2 2\n", "src/test/resources/org/springframework/samples/... 2 2\n", "src/test/resources/org/springframework/samples/... 3 3\n", "src/test/resources/org/springframework/samples/... 2 2\n", "src/test/resources/org/springframework/samples/... 5 5\n", "src/test/resources/org/springframework/samples/... 2 2\n", "src/test/resources/org/springframework/samples/... 2 2\n", "src/test/resources/spring/mvc-test-config.xml 1 1\n", "travis.yml 2 2\n", "\n", "[1674 rows x 2 columns]" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "ownership = git_log.groupby(['filename', 'author']).count()\n", "ownership.groupby(\n", " [ownership.index.get_level_values(0)]).sum()" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.6.4" } }, "nbformat": 4, "nbformat_minor": 2 }