我已经在网上浏览了好几个小时,但找不到任何解决方案。我将Angular与LocalStorage一起使用来获取match_id。
我有以下代码段,这使我Error: undefined is not an object (evaluating '$scope.$storage.match_id')
app.controller('confirmMatchCtrl', ["$scope", "$filter", "$routeParams", "$translate", "$location", "Data", "$http", "onlineStatus", "$localStorage",
function ($scope, $filter, $routeParams, $translate, $location, Data, $http, onlineStatus, $localStorage) {
var id = $scope.$storage.match_id;
也许有人有主意吗?
谢谢
答案 0 :(得分:0)
您需要先分配存储空间,并另外进行一次null / undefined检查,以避免这种情况。
import pandas as pd
# read file
df = pd.read_excel('file.xlsx')
# extract value
val = df.at['N of extremum', 'Curve 1']