我正在为网站编写自定义主题,因此无法使用 Javascript。我想将一些数字转换为罗马数字。
我试过这个:
.score:before {
counter-reset: mycounter attr(score number, 0);
content: counter(mycounter, upper-roman) " ";
}Run Code Online (Sandbox Code Playgroud)
<p><span class="score" score="11">points</span></p>Run Code Online (Sandbox Code Playgroud)
唉,似乎“attr(score number, 0)”总是0。这不是因为回退,因为当我将回退数字更改为42时,结果仍然是0。这在代码中的其他地方不是问题,因为当我attr(...)用 42 这样的数字替换时它工作得很好。
那么为什么这段代码没有显示出它应该显示的内容呢?
有没有办法将Python 3模块导入Python 2脚本?我想在Django应用程序中使用一些Python 3模块,并且在Internet上没有看到任何东西.有线索吗?
我正在使用 PySpark 将数据帧写入 CSV 文件,如下所示:
df.write.csv(PATH, nullValue='')
Run Code Online (Sandbox Code Playgroud)
该数据框中有一列字符串类型。一些值为空。这些空值显示如下:
...,"",...
Run Code Online (Sandbox Code Playgroud)
我希望它们像这样显示:
...,,...
Run Code Online (Sandbox Code Playgroud)
这可以通过csv.write() 中的选项实现吗?
谢谢!
apache-spark ×1
css ×1
css-content ×1
css-counter ×1
csv ×1
django ×1
html ×1
pyspark ×1
python ×1
python-2.x ×1
python-3.x ×1