isort --profile black --recursive . (#2170)

* isort --profile black --recursive .

* Update codespell.yml

* typo: vertices

* typo: Explanation

* typo: Explanation

* Fix typos
This commit is contained in:
Christian Clauss
2020-07-06 05:18:18 +02:00
committed by GitHub
parent 25d9d819a2
commit cd3e8f95a0
6 changed files with 10 additions and 9 deletions

View File

@ -250,7 +250,7 @@ def ReportGenerator(
df["dummy"] = 1
numeric_cols = df.select_dtypes(np.number).columns
report = (
df.groupby(["Cluster"])[ # constract report dataframe
df.groupby(["Cluster"])[ # construct report dataframe
numeric_cols
] # group by cluster number
.agg(
@ -289,14 +289,14 @@ def ReportGenerator(
clustersize = report[
(report["Features"] == "dummy") & (report["Type"] == "count")
] # caclulating size of cluster(count of clientID's)
] # calculate the size of cluster(count of clientID's)
clustersize.Type = (
"ClusterSize" # rename created cluster df to match report column names
)
clustersize.Features = "# of Customers"
clusterproportion = pd.DataFrame(
clustersize.iloc[:, 2:].values
/ clustersize.iloc[:, 2:].values.sum() # caclulating proportion of cluster
/ clustersize.iloc[:, 2:].values.sum() # calculating the proportion of cluster
)
clusterproportion[
"Type"