【发布时间】:2021-10-02 23:12:53
【问题描述】:
coconut documentation中提供的示例
obj |> .attribute |> .method(args) |> func$(args) |> .[index]
但是我想知道我们怎样才能一个接一个地应用两个不返回任何东西的方法,它们只是修改对象
例如:
椰子
(
data
|> Model
|> .fit() # does not return anything
|> .summary() # therefore, this throws an error
)
Python
m = Model()
m.fit()
m.summary()
【问题讨论】:
标签: python machine-learning methods functional-programming coconut