我定义了三个条纹计划(免费、正常、高级)。当用户想要升级(例如从普通用户升级到高级用户)时,用户应该获得高级计划的新订阅。到目前为止,这是我的代码:
subscription = stripe.Subscription.modify(
id=stripe_subscription_id,
items=[
{
'plan': stripe_plan_id,
}
],
)
Run Code Online (Sandbox Code Playgroud)
在文档中不需要另一个必需的参数。但我收到这个错误:
modify() missing 1 required positional argument: 'sid'
Run Code Online (Sandbox Code Playgroud)
有人知道这个参数的含义以及我应该将其放在代码中的什么位置吗?
我有一个.pl文件,由非结构化标头和一些特定的XYZ结构组成.标题没有"." 在那里.您可以在下面找到此文件的片段:
Header (in total 29 lines)
ILINE
VRTX 1 545057.78564453125 3800905.201171875 -15000
VRTX 2 545184.49072265625 3800765.451171875 -15000
VRTX 3 545310.91650390625 3800625.970703125 -15000
SEG 1 2
SEG 2 3
ILINE
VRTX 136 551295.84606933594 3799015.443359375 -15000
VRTX 137 551293.82849121094 3798841.880859375 -15000
VRTX 138 551290.57849121094 3798661.892578125 -15000
SEG 136 137
SEG 137 138
Run Code Online (Sandbox Code Playgroud)
我想要实现的是将我的X和Y值的小数点移到左边,如下所示:
VRTX 1 5450.5778564453125 38009.05201171875 -15000
VRTX 2 5451.8449072265625 38007.65451171875 -15000
VRTX 3 5453.1091650390625 38006.25970703125 -15000
Run Code Online (Sandbox Code Playgroud)
我认为正则表达式可能有所帮助,但我没有使用Python和Shell的经验.任何帮助表示赞赏.
这是我的第一篇文章,所以我试图以正确的格式来做。我有两列包含文本和值以及索引日期。
Date Zweck Betrag
2014-09-26 00:00:00 Gehalt 22.0
2014-09-26 01:00:00 REWE 1.0
2014-09-26 02:00:00 Edeka 76.0
2014-09-26 03:00:00 Bike 51.0
2014-09-26 04:00:00 ING 64.0
2014-09-26 05:00:00 Allianz 93.0
2014-09-26 06:00:00 Bahn 8.0
2014-09-26 07:00:00 Kaufhof 33.0
2014-09-26 08:00:00 CA 6.0
2014-09-26 09:00:00 Shell 55.0
Run Code Online (Sandbox Code Playgroud)
如果 Text 不是 Salary (所以是负值),我想做的是翻转每一行中的符号。我用这种方法尝试过,但我不起作用:
for r in np.arange(len(df)):
if df.ix[r].Zweck != 'Gehalt':
betrag = df.ix[r].Betrag
df.loc[r, 'Betrag'] = -1 * betrag
Run Code Online (Sandbox Code Playgroud)