当前位置:首页>python>Python Pandas 实战

Python Pandas 实战

  • 2026-08-21 14:09:25
Python Pandas 实战

从 3 个 PKL 文件里抓出 6 个隐藏错误,拼出 18 万行训练表

做 AI 药物研发,很多人一上来就想训练 Random Forest、XGBoost,甚至直接谈大模型。

但真实的数据分析往往没那么浪漫。

模型还没见到,数据表里已经埋好了六颗雷:

NaN
False
-inf
MUT_ERROR
category dtype
以及一个看起来正常、实际会把行数合错的 merge key

这次练习的任务很明确:

输入:3 个 PKL 文件
输出:merged2

最终尺寸:
182,853 rows × 23,542 columns

其中 Random Forest 输入特征:
23,538 columns

原始练习要求先理解三张表的结构,再完成两次 merge,Random Forest 训练暂时不做。


一、先别急着 merge,先看清三张表

我们有三个数据集。

1. Response data

194,750 行 × 3 列

三列分别是:

cellLine
drug
IC50(LN)

一行代表:

某个药物作用于某个细胞系时,对应的 IC50。

2. Drug data

217 行 × 2,326 列

其中:

1 列 Drug name
2,325 列药物分子描述符

这些 descriptor 可以理解为机器学习眼中的“分子体检报告”,包括不同维度的物理化学和拓扑特征。

3. Mutation data

21,213 行 × 1,002 列

当前结构是:

行:mutation
列:cell line
值:0 或 1

问题也在这里。

Response 表是一行一个 cellLine,但 Mutation 表却是一列一个 cellLine

所以它不能直接 merge,必须先转置。三张原始表的实际尺寸和最终目标都在配套 Notebook 中进行了明确检查。


二、第一原则:不要相信“成功读取”的数据

import pandas as pd
import numpy as np

response = pd.read_pickle("20260729_Response_data_FX.pkl")
drug = pd.read_pickle("20260729_Drug_data_FX.pkl")
mutation = pd.read_pickle("20260729_Mutation_data_FX.pkl")

程序没有报错,不等于数据没有错误。

先检查尺寸:

print("response:", response.shape)
print("drug:    ", drug.shape)
print("mutation:", mutation.shape)

再看一小部分:

display(response.head())
display(drug.iloc[:5, :8])
display(mutation.iloc[:5, :8])

为什么不用直接输入:

drug

因为它有 2,326 列。

Jupyter 会努力展示,你的浏览器会努力活着。


三、Error 1:IC50 中藏了一个 NaN

先检查真正的缺失值:

missing_ic50 = response["IC50(LN)"].isna()

response.loc[missing_ic50]

发现一行:

cellLine: KMS-12-BM
drug: AS601245
IC50(LN): NaN

最简单的考试处理方法是用中央值填补:

ic50_numeric = pd.to_numeric(
    response["IC50(LN)"],
    errors="coerce"
)

ic50_median = ic50_numeric.median()

response.loc[
    missing_ic50,
"IC50(LN)"
] = ic50_median

这里每行代码都值得理解。

pd.to_numeric(...)

尝试把所有值转换为数字。

errors="coerce"

表示:

遇到无法转换成数字的内容,不要报错,把它改成 NaN

median()

计算有效 IC50 数值的中位数。


四、Error 2:IC50 里还有一个假装成数据的 "False"

如果只检查:

response["IC50(LN)"].isna()

你只能发现真正的 NaN

但字符串 "False" 并不是缺失值,它只是不能用于回归。

解决办法是先尝试数字转换:

ic50_numeric = pd.to_numeric(
    response["IC50(LN)"],
    errors="coerce"
)

然后找出:

  1. 转换后变成 NaN
  2. 转换前又不是空值
text_ic50 = (
    ic50_numeric.isna()
    & response["IC50(LN)"].notna()
)

response.loc[text_ic50]

这样就找到了:

cellLine: LB1047-RCC
drug: GSK1070916
IC50(LN): "False"

修复:

response.loc[
    text_ic50,
"IC50(LN)"
] = ic50_median

response["IC50(LN)"] = pd.to_numeric(
    response["IC50(LN)"]
)

最后检查:

print(response["IC50(LN)"].isna().sum())
print(response["IC50(LN)"].dtype)

期待结果:

0
float64

这两个 IC50 错误,一个是真正的缺失值,一个是隐藏在数值列里的字符串。


五、中位数填补,到底是救命还是造数据?

这一步需要单独谈一下。

中位数的优点

第一,不删除行。

如果直接删除 IC50 错误行,样本会减少。删除某个药物 descriptor 行时,甚至会连带失去数百或数千条药物响应记录。

第二,不容易被极端值带跑。

例如:

1, 2, 3, 4, 100

平均值是:

22

中位数是:

3

对于偏态数据,中位数通常比平均值更稳。

第三,简单、快速、容易考试。

一行代码就能解决:

df["x"] = df["x"].fillna(df["x"].median())

中位数的缺点

问题也很直接:

中位数不是实验测出来的,是我们填进去的。

它会带来几个后果:

  • 人为制造一个并不存在的观测值
  • 多个缺失值被填成同一个数字,导致方差变小
  • 可能破坏不同 descriptor 之间的化学关系
  • 掩盖原始计算失败的真正原因

更重要的是,正式训练模型时不能先对全部数据计算中位数,再划分 train 和 test。

正确顺序是:

先划分 train/test
只用 train 计算中位数
用 train 的中位数处理 train 和 test

否则测试集的信息会提前泄漏到训练流程里。

这次考试使用中位数,是为了修复错误并保留原始行数,从而得到规定的最终 shape。真实研究中,优先选择应当是回到原始数据库或计算流程,找回正确数值。配套 Notebook 也明确区分了这一点。


六、Error 3:Drug descriptor 中有一个 NaN

先统计每列缺失值:

drug_missing_count = drug.isna().sum()

drug_missing_count[
    drug_missing_count > 0
]

结果:

SpAbs_Dze    1

找出是哪一个药物:

drug.loc[
    drug["SpAbs_Dze"].isna(),
    ["Drug name""SpAbs_Dze"]
]

发现:

NSC-87877
SpAbs_Dze = NaN

修复:

spabs_median = drug["SpAbs_Dze"].median()

drug["SpAbs_Dze"] = drug["SpAbs_Dze"].fillna(
    spabs_median
)

注意,这里填的是 SpAbs_Dze 自己这一列的中位数,不是随便从整个 DataFrame 里找一个数字。


七、Error 4:isna() 看不到的 -inf

另一个 descriptor 错误是:

T0901317
GATS3v = -inf

-inf 不是 NaN

所以:

drug["GATS3v"].isna()

抓不到它。

必须使用:

np.isinf()

检查:

infinite_gats3v = np.isinf(
    drug["GATS3v"]
)

drug.loc[
    infinite_gats3v,
    ["Drug name""GATS3v"]
]

修复分三步。

drug["GATS3v"] = drug["GATS3v"].replace(
    [np.inf, -np.inf],
    np.nan
)

先把正负无穷改成 NaN

gats3v_median = drug["GATS3v"].median()

再计算有效数值的中位数。

drug["GATS3v"] = drug["GATS3v"].fillna(
    gats3v_median
)

最后填补。

这两类 Drug 错误分别是 SpAbs_Dze 的缺失值和 GATS3v 的负无穷。

验证:

drug_feature_columns = drug.columns.drop("Drug name")

print(
    drug[drug_feature_columns]
    .isna()
    .sum()
    .sum()
)

print(
    np.isinf(
        drug[drug_feature_columns].to_numpy()
    ).sum()
)

应该都是:

0

八、Error 5:Mutation 的 0/1 世界里混进了 "MUT_ERROR"

Mutation 数据理论上应该是:

0 或 1

先找出不是数值类型的列:

mutation_feature_columns = mutation.columns.drop(
"Mutation"
)

non_numeric_columns = (
    mutation[mutation_feature_columns]
    .select_dtypes(exclude="number")
    .columns
)

print(non_numeric_columns.tolist())

得到:

['Hs683', 'KE-37']

别急着一起处理。

这两个列看起来都不是普通数值列,但病因完全不同。

检查 Hs683

hs683_numeric = pd.to_numeric(
    mutation["Hs683"],
    errors="coerce"
)

bad_hs683 = (
    hs683_numeric.isna()
    & mutation["Hs683"].notna()
)

mutation.loc[
    bad_hs683,
    ["Mutation""Hs683"]
]

发现:

Mutation: ENST00000264463/c.2182C>T
Hs683: MUT_ERROR

由于这是二元数据,使用中位数的解释不如众数自然。

hs683_mode = (
    hs683_numeric
    .dropna()
    .mode()
    .iloc[0]
)

然后修复:

mutation.loc[
    bad_hs683,
"Hs683"
] = hs683_mode

mutation["Hs683"] = pd.to_numeric(
    mutation["Hs683"]
)

九、Error 6:KE-37 的值没错,dtype 错了

检查 category 类型:

category_columns = (
    mutation
    .select_dtypes(include="category")
    .columns
)

print(category_columns.tolist())

结果:

['KE-37']

这次不需要填补。

因为 KE-37 中的值本来就是有效的 0 和 1,只是被存成了 category

直接转换:

mutation["KE-37"] = mutation["KE-37"].astype(
"int8"
)

这里还有一个实用点。

int8 足够保存:

0
1

没有必要使用更占内存的 int64

Hs683 是字符串污染,KE-37 则只是 category dtype,两者需要不同的处理逻辑。

最后把所有 mutation feature 都转成 int8

mutation[
    mutation_feature_columns
] = mutation[
    mutation_feature_columns
].astype("int8")

十、把 Mutation 表转过来

当前 Mutation 表是:

行:21,213 个 mutation
列:1,001 个 cell line

我们需要:

行:1,001 个 cell line
列:21,213 个 mutation

代码:

mutation_wide = (
    mutation
    .set_index("Mutation")
    .T
)

mutation_wide.index.name = "cellLine"

mutation_wide = mutation_wide.reset_index()

逐行理解。

.set_index("Mutation")

把 mutation 名称设为行索引。

.T

行列交换。

mutation_wide.index.name = "cellLine"

告诉 pandas,现在每一行的索引代表 cell line。

.reset_index()

把索引重新变成普通列,方便 merge。

检查:

print(mutation_wide.shape)

正确答案:

(1001, 21214)

为什么是 21,214 列?

21,213 mutation features
+ 1 cellLine
= 21,214

配套 Notebook 对转置后的 shape 和 cellLine 唯一性进行了双重验证。


十一、第一次 merge:Response + Drug

Response 中药物列名是:

drug

Drug 数据中药物列名是:

Drug name

名字不同,所以不能写:

on="drug"

正确写法:

merged1 = pd.merge(
    response,
    drug,
    left_on="drug",
    right_on="Drug name",
    how="inner",
    validate="many_to_one"
)

解释两个重要参数。

how="inner"

只保留两边都能匹配的药物。

validate="many_to_one"

检查数据关系是否符合:

很多条 response
对应
一条 drug descriptor

检查:

assert merged1.shape == (1947502329)

列数为什么是 2,329?

Response 3列
+ Drug 2,326列
= 2,329列

drug 和 Drug name 名字不同,因此都会保留下来。第一次 merge 的预期结果是 194,750 × 2,329


十二、第二次 merge:加入 Mutation

merged2 = pd.merge(
    merged1,
    mutation_wide,
    on="cellLine",
    how="inner",
    validate="many_to_one"
)

这次两张表都叫:

cellLine

所以直接使用:

on="cellLine"

检查最终答案:

assert merged2.shape == (18285323542)

print(merged2.shape)

输出:

(182853, 23542)

行数计算:

194,750 response rows
- 11,897 个无法与 mutation 精确匹配的 rows
= 182,853 rows

列数计算:

merged1:        2,329
mutation_wide: 21,214
重复 cellLine:     -1
----------------------
最终:           23,542

最终行列数和计算方式都在 Notebook 中通过 assert 固定下来。


十三、为什么 Random Forest 特征是 23,538,而不是 23,542?

最终表有 23,542 列,但下面四列不能作为普通输入特征:

cellLine
drug
IC50(LN)
Drug name

其中:

  • cellLine 是样本身份
  • drug 是药物名称
  • Drug name 是重复药物身份
  • IC50(LN) 是模型需要预测的目标 y

所以:

23,542 - 4 = 23,538

代码:

non_feature_columns = [
"cellLine",
"drug",
"IC50(LN)",
"Drug name"
]

rf_feature_columns = [
    column
for column in merged2.columns
if column notin non_feature_columns
]

assert len(rf_feature_columns) == 23538

这也正是原始任务给出的 Random Forest 输入特征数量。


十四、最容易把答案做错的一步:不要过度清洗名字

很多人看到细胞系名字,第一反应是统一格式:

.str.lower()
.str.replace("-""")
.str.replace("_""")
.str.replace(" """)

听起来很专业,但可能是在给数据制造亲戚关系。

例如:

KMH-2
KM-H2

它们未必是同一个细胞系。

如果把连字符全部删除,两者都会变成:

kmh2

结果就是错误匹配。

之前出现过一个结果:

185,194 rows

比正确答案多:

185,194 - 182,853 = 2,341 rows

这些不是模型捡到的免费样本,而是过度规范化制造出来的错误匹配。

这次考试的原则是:

使用原始药物名和 cellLine 名称进行精确匹配。


十五、最终核心代码

import pandas as pd
import numpy as np

response = pd.read_pickle(
"20260729_Response_data_FX.pkl"
)

drug = pd.read_pickle(
"20260729_Drug_data_FX.pkl"
)

mutation = pd.read_pickle(
"20260729_Mutation_data_FX.pkl"
)

# 1. 修复 IC50
ic50 = pd.to_numeric(
    response["IC50(LN)"],
    errors="coerce"
)

response["IC50(LN)"] = ic50.fillna(
    ic50.median()
)

# 2. 修复 Drug descriptor NaN
drug["SpAbs_Dze"] = drug["SpAbs_Dze"].fillna(
    drug["SpAbs_Dze"].median()
)

# 3. 修复 Drug descriptor -inf
drug["GATS3v"] = drug["GATS3v"].replace(
    [np.inf, -np.inf],
    np.nan
)

drug["GATS3v"] = drug["GATS3v"].fillna(
    drug["GATS3v"].median()
)

# 4. 修复 Hs683 字符串
hs683 = pd.to_numeric(
    mutation["Hs683"],
    errors="coerce"
)

mutation["Hs683"] = hs683.fillna(
    hs683.dropna().mode().iloc[0]
).astype("int8")

# 5. 修复 KE-37 dtype
mutation["KE-37"] = mutation["KE-37"].astype(
"int8"
)

# 6. 转置 Mutation
mutation_wide = (
    mutation
    .set_index("Mutation")
    .T
)

mutation_wide.index.name = "cellLine"

mutation_wide = mutation_wide.reset_index()

# 7. 第一次 merge
merged1 = pd.merge(
    response,
    drug,
    left_on="drug",
    right_on="Drug name",
    how="inner",
    validate="many_to_one"
)

# 8. 第二次 merge
merged2 = pd.merge(
    merged1,
    mutation_wide,
    on="cellLine",
    how="inner",
    validate="many_to_one"
)

# 9. 最终检查
assert merged1.shape == (1947502329)
assert mutation_wide.shape == (100121214)
assert merged2.shape == (18285323542)

print("Mission complete:", merged2.shape)

十六、课后测试

先自己回答,不要急着往下翻。

1

为什么要使用:

errors="coerce"

A. 自动删除错误行 B. 把不能转换成数字的内容变成 NaNC. 把所有数字变成字符串 D. 自动计算中位数

2

下面哪个函数能够发现 -inf

A. isna()B. isnull()C. np.isinf()D. duplicated()

3

为什么 Mutation 数据需要 .T

A. 为了删除 mutation B. 为了让 cell line 从列变成行 C. 为了计算 IC50 D. 为了降低特征数量

4

为什么 Hs683 更适合用众数,而不是中位数?

A. 它是药物名称 B. 它是连续型 descriptor C. 它是 0/1 二元数据 D. 它是 IC50

5

第一次 merge 为什么使用:

left_on="drug"
right_on="Drug name"

A. 两张表的 merge key 名称不同 B. 两张表的行数相同 C. 为了自动删除重复列 D. 因为 cellLine 不存在

6

validate="many_to_one" 检查的是什么?

A. 左表每行只能对应左表自己 B. 多条 response 可以对应一个 drug descriptor C. 两张表必须有相同列数 D. 所有数据必须是整数

7

最终为什么有 23,542 列?

请完成:

2,329 + 21,214 - ___ = 23,542

8

Random Forest 为什么只有 23,538 个输入特征?

9

对 cellLine 执行下面操作有什么风险?

.str.replace("-""")

10

最终最重要的验证代码是什么?


答案

1

B。

errors="coerce" 会把不能转换成数字的字符串变成 NaN

2

C。

-inf 不是普通缺失值,需要用:

np.isinf()

3

B。

原始 Mutation 表中 cell line 在列上,而 merge 需要一个 cell line 对应一行。

4

C。

Mutation 是 0/1 二元数据,众数比连续型数据常用的中位数更容易解释。

5

A。

左表叫 drug,右表叫 Drug name

6

B。

多条药物响应记录对应一个药物 descriptor 行。

7

答案是:

1

因为 cellLine 是两张表共有的 merge key,只保留一次。

8

因为需要排除:

cellLine
drug
IC50(LN)
Drug name

所以:

23,542 - 4 = 23,538

9

可能把原本不同的细胞系名称变成相同 key,造成错误匹配和行数膨胀。

10

assert merged2.shape == (18285323542)

没有这句,代码跑完了,你也不知道自己是完成任务,还是安静地做错了。


最后一句

这次练习真正训练的,不是 pd.merge()

而是三个更重要的习惯:

先理解数据结构
再识别数据错误
最后验证结果尺寸

Random Forest 不会因为你写了 n_estimators=500 就自动变聪明。

如果输入表里混着 "False"-inf 和错误匹配,它只是会用五百棵树,非常认真地学习错误。

Jupyter Notebook + rawdata download from my star~

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 19:58:21 HTTP/2.0 GET : https://f.mffb.com.cn/a/507804.html
  2. 运行时间 : 0.220580s [ 吞吐率:4.53req/s ] 内存消耗:4,665.48kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=ba8ffbed636541743a1da51ff1d12633
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000938s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001475s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000747s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000692s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001348s ]
  6. SELECT * FROM `set` [ RunTime:0.000616s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001453s ]
  8. SELECT * FROM `article` WHERE `id` = 507804 LIMIT 1 [ RunTime:0.003464s ]
  9. UPDATE `article` SET `lasttime` = 1787313501 WHERE `id` = 507804 [ RunTime:0.015261s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.006122s ]
  11. SELECT * FROM `article` WHERE `id` < 507804 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.005244s ]
  12. SELECT * FROM `article` WHERE `id` > 507804 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000824s ]
  13. SELECT * FROM `article` WHERE `id` < 507804 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.018940s ]
  14. SELECT * FROM `article` WHERE `id` < 507804 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002076s ]
  15. SELECT * FROM `article` WHERE `id` < 507804 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.005425s ]
0.223393s