是否有内置函数来添加新列,该新列是原始列的否定?
Spark SQL有这个功能negative()。Pyspark好像没有继承这个功能。
df_new = df.withColumn(negative("orginal"))
Run Code Online (Sandbox Code Playgroud) OpenCV 文档表明,在 Point 类中,有一个可以在数据类型(int --> float 等)之间进行转换的成员函数。文档宣传了以下“转换为另一种数据类型”的功能。
cv::Point_< _Tp >::operator Point_< _Tp2 > () const
Run Code Online (Sandbox Code Playgroud)
我无法让它发挥作用。我已经尝试过以下方法。
cv::Point2i test(0,0);
cv::Point2f out;
test.Point <Point2f>;
Run Code Online (Sandbox Code Playgroud)
或者
cv::Point2i test(0,0);
cv::Point2f out;
test.operator Point<Point2f>;
Run Code Online (Sandbox Code Playgroud)
有人用过这个功能吗?