所以我有一个 df,我在其中提取一个值以将其存储在另一个 df 中:
import pandas as pd
# Create data set
d = {'foo':[100, 111, 222],
'bar':[333, 444, 555]}
df = pd.DataFrame(d)
# Full dataframe:
print(df)
# Shows:
# bar foo
# 0 333 100
# 1 444 111
# 2 555 222
df2=pd.DataFrame()
df2.loc[1,'Name'] = df[df.foo == 222]['foo']
#error:
ValueError: Incompatible indexer with Series
Run Code Online (Sandbox Code Playgroud)
我假设最后一行抛出该错误,因为df[df.foo == 222]['foo']
是一个Series
:
2 222
Name: foo, dtype: int64
Run Code Online (Sandbox Code Playgroud)
所以我试图获得价值本身。我使用.at
并得到了这个:
print(df[df.foo == 222].loc[:,'bar'].at['bar'])
#ValueError: At based indexing on …
Run Code Online (Sandbox Code Playgroud) 当我第一次运行flutterfire configure
我的 flutter 应用程序时,生成了 4 个文件。firebase_options.dart
,google-services.json
,firebase_app_id_file.json
和GoogleServices-Info.plist
。
当我尝试flutterfire configure
再次使用将我的应用程序链接到我的应用程序的开发版本(遵循此线程)时,系统仅提示我更改其中的 3 个文件,如下所示:
\n\ngoogle-services.json 文件已存在,但用于不同的 Firebase 项目 (betacentre-dev)。您想将其替换为 Firebase 项目 Thinking-digit-343408 吗?\xc2\xb7 是
\n
选择yes
所有这些后,只有 GoogleService-Info.plist 没有更改,但这对于 firebase 的工作显然至关重要(因为flutterfire configure
首先添加了它,并且在本指南和本指南中都引用了它,并且它包含标识符对于我的 firebase 项目,并且我的应用程序仍然与原始项目通信)。
这是一个错误吗?为什么会这样?
\nnpx expo start
我正在尝试与我的“纯”react-native 项目一起使用(即我使用 React Native 的 CLI 创建了该项目)
当我运行时npx expo start
,我收到此错误:
iOS Bundling complete 36518ms
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes
Run Code Online (Sandbox Code Playgroud)
在这个stackoverflow 线程之后,我确保我的应用程序名称是和中的“sotravelapp” package.json
,它从 …