Linux文件系统

  • 5.创建文逻辑卷件系统 mkfs.ext4 /dev/vgname/lvname
  • 6.挂载逻辑卷到虚拟目录 mount /dev/vgname/lvname /mnt

Original: https://www.cnblogs.com/tjane/p/16795365.html
Author: Tjane’Blogs
Title: Linux文件系统



相关阅读

Title: 数据分析方法(5)之同期群分析

  • 如果单独看同一时间群,在同一时间段内,群是具有某些相似特征或行为的用户群。
    [En]

    if you look at the same time group separately, during the same period of time, a group is a group of users with some similar characteristics or behavior.*

  • 综合来看,同时群是指同一时间段内具有相似特征或行为的用户。
    [En]

    taken together, a simultaneous group refers to users with similar characteristics or behavior in the same period of time.*

  • 最常见的分组是按日期分组,分析同一日期(同期)的新增用户(组)的留存率,这样不仅可以分析不同日期的新增用户数,还可以分析不同日期的新增用户的留存率。
    [En]

    the most common group is grouped by date, and the retention rate of new users (groups) on the same date (the same period) is analyzed, so that we can analyze not only the number of new users on different dates, but also the retention rate of new users on different dates.*

  • 同步组别分析是比较不同同步组别的相同指标
    [En]

    simultaneous group analysis is to compare the same indicators among different simultaneous groups.*

让我们直接来看一个例子,这个例子更清楚。

[En]

Let’s take a direct look at an example, which is clearer.

  • 计算各月份的留存率。
import pandas as pd
import numpy as np
import warnings
import matplotlib.pyplot as plt
from datetime import datetime as dt

plt.rcParams['font.sans-serif'] =['Microsoft YaHei']
plt.rcParams['axes.unicode_minus'] = False
warnings.filterwarnings("ignore")

df = pd.read_excel('同期群订单数据.xlsx',usecols=['客户昵称','付款时间'])
df['付款时间'] = df['付款时间'].dt.to_period('M')
df.dropna(subset=['付款时间'],axis=0,inplace=True)
df.drop_duplicates(inplace=True)

Linux文件系统
  • 计算每位用户的首次付款时间
    [En]

    calculate the first payment time for each user*

user_first_day = pd.DataFrame(df.groupby('客户昵称')['付款时间'].min()).reset_index()user_first_day.columns = ['客户昵称','首次付款时间']
  • 把用户当连接字段,将df和user_first_day进行表连接,用来计算日期差
from operator import attrgetterdata = df.merge(right=user_first_day,how='left',on='客户昵称')data['日期差'] = (data['付款时间'] - data['首次付款时间']).apply(attrgetter('n'))"""不用attrgetter也可以进行计算,两种方法:# 年份做差*12 + 月份做差 dt.year取年份值 dt.month取月份值12 * (data['付款时间'].dt.year - data['首次付款时间'].dt.year) + data['付款时间'].dt.month - data['首次付款时间'].dt.month# 将日期转为整数值 做差  以1970.01.01为基准,转为整数后得结果为距离1970.01的月份差 。例如2019.09年距离1970.01差596个月份 ,所以2019.09转为整数就为596data['付款时间'].astype('int') - data['首次付款时间'].astype('int')"""data.tail(3)

Linux文件系统
  • 统计新增用户数和留存用户数
    [En]

    calculate the number of new users and retained users*

dd = pd.pivot_table(data=data,index='首次付款时间',columns='日期差',values='客户昵称',aggfunc='count')dd

Linux文件系统
  • 计算留存率 并以热力图展示
import seaborn as sns
cc = dd.copy()
for i in range(1,len(dd.columns)):
    cc[i] = round(dd[i]/dd[0]*100,2)

sns.heatmap(cc.iloc[0:5,1:6],cmap='YlGnBu',annot=True,fmt='.2f')
plt.yticks(rotation=0)
plt.ylabel('月份')
plt.xlabel('月份差')
plt.title('2019.09-2020.01同期群分析')
plt.show()

Linux文件系统
  • 横向来看,不同群体留存率显示,各月用户留存率呈逐日下降趋势。
    [En]

    horizontally, the retention rate of different groups shows that the retention rate of users in each month is decreasing day by day.*

  • 纵向看,同一时间段不同日期留存率也有所下降2019.10的留存率较2019.09明显下降,2019.11后有所上升,表明商家采取了一些优惠措施来提高用户的留存率。
    [En]

    from a vertical point of view, the retention rate for the same period of time on different dates also decreased. The retention rate of 2019.10 decreased significantly compared with 2019.09, and increased after 2019.11, indicating that merchants have taken some preferential measures to increase the retention rate of users.*

参考:
数据分析八大模型:同期群模型
同期群分析(Cohort Analysis)

Original: https://blog.csdn.net/m0_69435474/article/details/124751778
Author: 小磊要努力哟
Title: 数据分析方法(5)之同期群分析

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/363429/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

最近整理资源【免费获取】:   👉 程序员最新必读书单  | 👏 互联网各方向面试题下载 | ✌️计算机核心资源汇总