我需要只匹配到空格,不要匹配到换行符/n/t之类的,也就是不能直接用/s
import re
text = "Hello World\nThis is a test string with spaces."
pattern = r' '
matches = re.findall(pattern, text)
print(matches)
可以使用[ ],pattern = r"[ ]{3}",这里的[ ]是一个字符集,表示仅匹配一个空格字符。{3}表示匹配连续出现的三次。
注:考虑到这个数据集特别的少,数量非常少,数据集直接粘贴到下面:
Congruent | Incongruent |
---|---|
12.079 | 19.278 |
16.791 | 18.741 |
9.564 | 21.214 |
8.63 | 15.687 |
14.669 | 22.803 |
12.238 | 20.878 |
14.692 | 24.572 |
8.987 | 17.394 |
9.401 | 20.762 |
14.48 | 26.282 |
22.328 | 24.524 |
15.298 | 18.644 |
15.073 | 17.51 |
16.929 | 20.33 |
18.2 | 35.255 |
12.13 | 22.158 |
18.495 | 25.139 |
10.639 | 20.429 |
11.344 | 17.425 |
12.369 | 34.288 |
12.944 | 23.894 |
14.233 | 17.96 |
19.71 | 22.058 |
16.004 | 21.157 |
[1] https://blog.csdn.net/qq_38214903/article/details/82965090 引用了关于 独立样本t检验的 scipy中 ttest_ind的操作方法
[2] https://support.minitab.com/zh-cn/minitab/18/help-and-how-to/statistics/basic-statistics/supporting-topics/tests-of-means/how-are-dependent-and-independent-samples-different/ 样本相关性知识,来源于这儿
[3] https://blog.csdn.net/qtlyx/article/details/52852034dataFrame 如何绘制箱型图的操作方法,参考自此博文
[4] https://blog.csdn.net/qq_38214903/article/details/82965697 Python统计分析-配对样本t检验
[5] https://github.com/ShiChJ/DAND-Basic-Materials/blob/master/P1/t-table.jpg T值表参考这儿