我的scala数据帧具有一列,其数据类型为array
(element: String
)。我想显示该列中包含单词“ hello”的数据框的那些行。
我有这个:
display(df.filter($"my_column".contains("hello")))
由于数据不匹配,我得到了一个错误。它说argument 1 requires string type, however, '
我的:列' is of array<string> type
。
答案 0 :(得分:1)
您可以使用layoutSmallerButton.setOnClickListener{
animateHeightOfView(layoutShrink, 0)
animateHeightOfView(buttonSmaller, 0)
animateHeightOfView(buttonLarger, 50)
animateHeightOfView(internetViewLarger, 1700)
}
fun animateHeightOfView(view: View, targetHeight: Int, animationDuration: Int = 1000){
ObjectAnimator.ofInt(view, "height", targetHeight).apply{
duration = animationDuration
start()
}
}
功能
array_contains