Skip to content

Commit 5e2a9b5

Browse files
committed
#
1 parent f121626 commit 5e2a9b5

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

PySvn_examples/commits__draw_plot__by_single_author.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,12 @@
77
from analys_commits import get_log_list_by_author
88
author_by_log = get_log_list_by_author()
99

10-
records = []
11-
10+
# Сбор коммитов за месяц/год
1211
from datetime import datetime
13-
14-
for log in author_by_log['ipetrash']:
15-
year_month = datetime(log.date.year, log.date.month, 1)
16-
records.append((log.date, year_month))
12+
records = [datetime(log.date.year, log.date.month, 1) for log in author_by_log['ipetrash']]
1713

1814
import pandas as pd
19-
df = pd.DataFrame(data=records, columns=['date', 'year_month'])
15+
df = pd.DataFrame(data=records, columns=['year_month'])
2016
print(df)
2117
print('Total rows:', len(df))
2218

0 commit comments

Comments
 (0)