写下方法的签名,该方法将在特定食谱的食谱中获取成分列表并非所有食谱都知道的地方

问题描述

我正在尝试创建方法的签名,但无法正确理解问题。请问有人可以帮助我在C#中执行相同的操作。

解决方法

让我们逐步进行。

写方法的签名

s = df.agg(['sin','cos'])
s.columns = s.columns.map('_'.join)
s
Out[9]: 
      A_sin     A_cos     B_sin     B_cos
0  0.000000  1.000000  0.841471  0.540302
1  0.841471  0.540302 -0.958924  0.283662
2  0.909297 -0.416147  0.412118 -0.911130

这将获得成分列表

void MyMethod()

针对特定食谱

List<Ingredient> MyMthod()

不是所有食谱都知道的地方

List<Ingredient> MyMethod(Recipe recipe)