我正在尝试在Visual Studio 2017中设置最简单的typescript + react-project。
我将此webpack.config.js更改为与webpack 2+一起使用 改变是使用“加载器”和“预加载器”到“规则”。
下面的内容我得到了错误
模块构建失败:错误TS5014:无法解析位于4521的JSON中的文件'C:\ Users \ my project \ tsconfig.json':Unexpected token}。
这是文件
df = pandas.DataFrame([
{'date': '2010-01-01', 'stock_a': 10, 'stock_b': 20, 'stock_c': 30},
{'date': '2010-01-02', 'stock_a': 9.5, 'stock_b': 18, 'stock_c': 31},
{'date': '2010-03-01', 'stock_a': 10.5, 'stock_b': 22, 'stock_c': 39},
{'date': '2010-04-01', 'stock_a': 11.5, 'stock_b': 23, 'stock_c': 36},
])
# Assuming you want the first chronological record of such an event
df = df.sort_values(['date', 'stock_a', 'stock_b', 'stock_c'])
df2 = pandas.concat([
df['stock_a'] > df['stock_a'][0],
df['stock_b'] > df['stock_b'][0],
df['stock_c'] > df['stock_c'][0],
], axis=1)
df2['date'] = True
# At this point columns stock_{a,b,c} are populated with NaN in place where the value
# was less than the first observation
df3 = df[df2].query('stock_a == stock_a & stock_b == stock_b & stock_c == stock_c')
if not df3.empty:
print df3.iloc[[0]]
print 'No match'
};