0
s=N.asarray(data)
pattern='[r  t \  n  \n ]'
r=re.split(pattern,str(s))

列出的所有变量都消失了,但我无法摆脱 \ 试图从大数据中获取整数

打印数据 ['儒略日\tLatitude\tLongitude\tTs\r\n', 'from 1/1/97\t(deg)\t(deg)\t(deg C)\r\n', '\r \n', '304.0833\t75.714\t-144.272\t-26.091\r\n', '304.1250\t75.713\t-144.262\t-22.571\r\n', '304.1667\t75.712 \t-144.250\t-20.329\r\n', '304.2083\t75.710\t-144.238\t-18.681\r\n', '304.2500\t75.710\t-144.227\t-18.174\r \n', '304.2917\t75.709\t-144.217\t-17.268\r\n', '304.3333\t75.709\t-144.206\t-17.244\r\n', '304.3750\t75.710 \t-144.194\t-17.670\r\n', '304.4167\t75.711\t-144.182\t-16.932\r\n', '304.4583\t75.712\t-144.170\t-16.436\r \n', '304.5000\t75.714\t-144.158\t-15.527\r\n', '304.5417\t75.717\t-144.144\t-15.118\r\n', '304.5833\t75.720 \t-144.130\t-15.066\r\n', '304.6250\t75.723\t-144.115\t-16.695\r\n', '304.6667\t75.725\t-144.100\t-17.118\r\n', '304.7083\t75.727\t-144.085\t-16.800\r\n', '304.7500\t75.728\t-144.071\ t-17.718\r\n'、'304.7917\t75.729\t-144.058\t-17.297\r\n'、'304.8333\t75.730\t-144.046\t\r\n'、'304.8750\ t75.730\t-144.039\t-24.482\r\n', '304.9167\t75.731\t-144.032\t-25.179\r\n', '304.9583\t75.731\t-144.024\t- 25.405\r\n', '305.0000\t75.732\t-144.016\t-24.449\r\n', '305.0417\t75.733\t-144.008\t-25.651\r\n', '305.0833\ t75.734\t-144.001\t-25.541\r\n', '305.1250\t75.734\t-143.991\t-22.360\r\n', '305.1667\t75.735\t-143.982\t- 20.684\r\n', '305.2083\t75.736\t-143.972\t-19.552\r\n', '305.2500\t75.738\t-143.963\t-19.220\r\n', '305.2917\ t75.740\t-143.955\t-18.997\r\n','305.3333\t75.742\t-143.949\t-18.765\r\n','305。3750\t75.744\t-143.944\t-18.249\r\n', '305.4167\t75.746\t-143.940\t-20.398\r\n', '305.4583\t75.748\t-143.937\ t-23.078\r\n', '305.5000\t75.751\t-143.934\t-24.182\r\n', '305.5417\t75.753\t-143.931\t-24.163\r\n', ' 305.5833\t75.756\t-143.928\t-23.551\r\n', '305.6250\t75.759\t-143.926\t-23.297\r\n', '305.6667\t75.763\t-143.923\ t-23.272\r\n', '305.7083\t75.766\t-143.921\t-21.429\r\n', '305.7500\t75.769\t-143.920\t-18.547\r\n', ' 305.7917\t75.772\t-143.921\t-16.185\r\n', '305.8333\t75.775\t-143.922\t-17.254\r\n', '305.8750\t75.779\t-143.923\ t-19.860\r\n', '305.9167\t75.783\t-143.926\t-20.187\r\n', '305.9583\t75.787\t-143.929\t-17.076\r\n', ' 306.0000\t75.790\t-143.933\t-15.079\r\n', '306.0417\t75.795\t-143.938\t-16.499\r\n','306.0833\t75.799\t-143.942\t-14.849\r\n', '306.1250\t75.804\t-143.946\t-14.412\r\n', '306.1667\t75.808\t-143.950 \t-15.021\r\n', '306.2083\t75.813\t-143.955\t-15.360\r\n', '306.2500\t75.817\t-143.959\t-15.970\r\n', '306.2917\t75.822\t-143.963\t-16.451\r\n', '306.3333\t75.826\t-143.967\t-16.585\r\n', '306.3750\t75.830\t-143.971 \t-17.072\r\n', '306.4167\t75.834\t-143.975\t-17.066\r\n', '306.4583\t75.838\t-143.978\t-18.862\r\n', '306.5000\t75.842\t-143.981\t-21.559\r\n', '306.5417\t75.846\t-143.983\t-23.081\r\n', '306.5833\t75.849\t-143.985 \t-22.948\r\n', '306.6250\t75.853\t-143.986\t-22.752\r\n', '306.6667\t75.857\t-143.987\t-20.773\r\n', '306.7083\t75.860\t-143.988\t-19.480\r\n','306.7500\t75.863\t-143.989\t-20。499\r\n', '306.7917\t75.866\t-143.990\t-21.428\r\n', '306.8333\t75.868\t-143.991\t-22.931\r\n', '306.8750\ t75.870\t-143.991\t-23.303\r\n', '306.9167\t75.873\t-143.993\t-21.795\r\n', '306.9583\t75.876\t-143.996\t- 19.980\r\n', '307.0000\t75.879\t-143.998\t-19.365\r\n', '307.0417\t75.882\t-144.002\t-21.537\r\n', '307.0833\ t75.886\t-144.004\t-23.963\r\n', '307.1250\t75.889\t-144.005\t-23.904\r\n', '307.1667\t75.892\t-144.006\t- 24.763\r\n', '307.2083\t75.895\t-144.006\t-24.136\r\n', '307.2500\t75.898\t-144.006\t-21.458\r\n', '307.2917\ t75.901\t-144.008\t-21.518\r\n', '307.3333\t75.904\t-144.009\t-23.013\r\n', '307.3750\t75.907\t-144.010\t- 24.552\r\n'、'307.4167\t75.909\t-144.010\t-24.915\r\n'、'307.4583\t75.912\t-144。011\t-24.834\r\n'、'307.5000\t75.915\t-144.012\t-24.089\r\n'、'307.5417\t75.917\t-144.013\t-25.630\r\n' , '307.5833\t75.920\t-144.013\t-26.018\r\n', '307.6250\t75.922\t-144.015\t-25.628\r\n', '307.6667\t75.924\t- 144.015\t-25.868\r\n'、'307.7083\t75.926\t-144.016\t-26.693\r\n'、'307.7500\t75.929\t-144.016\t-26.784\r\n' , '307.7917\t75.931\t-144.016\t-26.876\r\n', '307.8333\t75.933\t-144.016\t-26.791\r\n', '307.8750\t\t\t- 26.733\r\n', '307.9167\t75.937\t-144.014\t-27.240\r\n', '307.9583\t75.939\t-144.013\t-26.464\r\n', '308.0000\ t75.941\t-144.013\t-25.476\r\n', '308.0417\t75.942\t-144.013\t-25.685\r\n', '308.0833\t75.944\t-144.013\t- 25.830\r\n'、'308.1250\t75.945\t-144.012\t-25.819\r\n'、'308.1667\t75.946\t-144。012\t-26.050\r\n'、'308.2083\t75.947\t-144.012\t-26.425\r\n'、'308.2500\t75.948\t-144.012\t-26.778\r\n' , '308.2917\t75.949\t-144.013\t-24.661\r\n', '308.3333\t75.950\t-144.015\t-21.419\r\n', '308.3750\t75.951\t- 144.017\t-19.948\r\n'、'308.4167\t75.952\t-144.019\t-19.251\r\n'、'308.4583\t75.953\t-144.021\t-18.471\r\n' , '308.5000\t75.954\t-144.023\t-17.745\r\n', '308.5417\t75.955\t-144.026\t-17.427\r\n', '308.5833\t75.956\t- 144.029\t-16.945\r\n'、'308.6250\t75.957\t-144.034\t-17.076\r\n'、'308.6667\t75.958\t-144.040\t-17.284\r\n' , '308.7083\t75.960\t-144.048\t-17.766\r\n', '308.7500\t75.961\t-144.057\t-20.430\r\n', '308.7917\t75.963\t- 144.067\t-22.862\r\n','308.8333\t75.964\t-144.078\t-25.668\r\n','308.8750\t75。965\t-144.090\t-22.393\r\n', '308.9167\t75.967\t-144.103\t-22.212\r\n', '308.9583\t75.968\t-144.115\t-20.578\ r\n'、'309.0000\t75.969\t-144.128\t-20.242\r\n'、'309.0417\t75.970\t-144.141\t-20.646\r\n'、'309.0833\t75。 970\t-144.155\t-21.979\r\n'、'309.1250\t\t\t-26.305\r\n'、'309.1667\t75.971\t-144.180\t-27.193\r\n' , '309.2083\t75.971\t-144.192\t-28.006\r\n', '309.2500\t75.971\t-144.205\t-28.152\r\n', '309.2917\t75.970\t- 144.218\t-25.851\r\n'、'309.3333\t75.970\t-144.230\t-27.048\r\n'、'309.3750\t75.970\t-144.243\t-26.699\r\n' , '309.4167\t75.969\t-144.256\t-25.079\r\n', '309.4583\t75.968\t-144.270\t-25.545\r\n', '309.5000\t75.967\t- 144.285\t-24.880\r\n'、'309.5417\t75.966\t-144.302\t-23.422\r\n'、'309.5833\t75。965\t-144.321\t-19.381\r\n', '309.6250\t75.963\t-144.342\t-18.041\r\n', '309.6667\t75.962\t-144.366\t-16.790\ r\n'、'309.7083\t75.961\t-144.395\t-16.714\r\n'、'309.7500\t75.960\t-144.427\t-16.582\r\n'、'309.7917\t75。 959\t-144.459\t-16.038\r\n', '309.8333\t75.959\t-144.492\t-16.059\r\n', '309.8750\t75.959\t-144.524\t-16.144\ r\n'、'309.9167\t75.960\t-144.556\t-15.961\r\n'、'309.9583\t75.961\t-144.586\t-16.116\r\n'、'310.0000\t75。 962\t-144.615\t-16.195\r\n', '310.0417\t75.964\t-144.643\t-16.067\r\n', '310.0833\t75.966\t-144.671\t-16.015\ r\n'、'310.1250\t75.968\t-144.697\t-16.041\r\n'、'310.1667\t75.970\t-144.722\t-15.835\r\n'、'310.2083\t75。 972\t-144.747\t-15.601\r\n', '310.2500\t75.975\t-144.771\t-16.065\r\n', '310.2917\t75.977\t-144.794\t-16.398\r\n', '310.3333\t75.979\t-144.817\t-16.529\r\n', '310.3750\t75.982\t-144.837\ t-16.556\r\n', '310.4167\t75.984\t-144.857\t-16.534\r\n', '310.4583\t75.986\t-144.874\t-16.175\r\n', ' 310.5000\t75.988\t-144.889\t-16.332\r\n', '310.5417\t75.990\t-144.904\t-16.512\r\n', '310.5833\t75.992\t-144.918\ t-16.324\r\n', '310.6250\t75.994\t-144.932\t-16.312\r\n', '310.6667\t75.995\t-144.944\t-16.310\r\n', ' 310.7083\t75.998\t-144.956\t-16.154\r\n', '310.7500\t76.000\t-144.968\t-15.842\r\n', '310.7917\t76.002\t-144.978\ t-15.479\r\n', '310.8333\t76.005\t-144.987\t-14.964\r\n', '310.8750\t76.007\t-144.994\t-16.227\r\n', ' 310.9167\t76.009\t-145.001\t-14.704\r\n', '310.9583\t76.011\t-145.010\t-14.271\r\n','311.0000\t76.012\t-145.018\t-13.963\r\n', '311.0417\t\t\t-14.694\r\n', '311.0833\t76.015\t-145.038\t-15.005 \r\n', '311.1250\t76.016\t-145.049\t-15.037\r\n', '311.1667\t76.017\t-145.060\t-15.001\r\n', '311.2083\t76 .019\t-145.072\t-14.941\r\n', '311.2500\t76.020\t-145.084\t-15.723\r\n', '311.2917\t76.022\t-145.097\t-16.460 \r\n', '311.3333\t76.023\t-145.108\t-16.040\r\n', '311.3750\t76.025\t-145.119\t-16.347\r\n', '311.4167\t76 .026\t-145.130\t-17.740\r\n', '311.4583\t76.027\t-145.140\t-18.170\r\n', '311.5000\t76.028\t-145.149\t-18.322 \r\n', '311.5417\t76.029\t-145.158\t-18.214\r\n', '311.5833\t76.030\t-145.167\t-17.956\r\n', '311.6250\t76 .030\t-145.175\t-17.628\r\n', '311.6667\t76.031\t-145.183\t-17.229\r\n', '311.7083\t76.031\t-145.192\t-17.307\r\n','311.7500\t76.032\t-145.200\t-17.727\r\n','311.7917\t76.033\t-145.208\ t-18.872\r\n', '311.8333\t76.034\t-145.216\t-20.060\r\n', '311.8750\t76.034\t-145.222\t-20.883\r\n', ' 311.9167\t76.035\t-145.228\t-21.230\r\n','311.9583\t76.036\t-145.232\t-21.332\r\n','312.0000\t76.037\t-145.236\ t-23.762\r\n', '312.0417\t76.038\t-145.239\t-24.388\r\n', '312.0833\t76.039\t-145.242\t-25.365\r\n', ' 312.1250\t76.040\t-145.246\t-24.093\r\n'、'312.1667\t76.041\t-145.249\t-23.095\r\n'、'312.2083\t76.042\t-145.252\ t-22.659\r\n', '312.2500\t76.043\t-145.255\t-22.177\r\n', '312.2917\t76.045\t-145.259\t-17.242\r\n', ' 312.3333\t76.046\t-145.262\t-15.134\r\n','312.3750\t76.048\t-145.265\t-13.879\r\n', '312.4167\t76.050\t-145.269\t-13.145\r\n', '312.4583\t76.053\t-145.272\t-12.715\r\n', '312.5000\t76.055\t- 145.274\t-12.416\r\n'、'312.5417\t76.058\t-145.277\t-12.190\r\n'、'312.5833\t76.061\t-145.279\t-12.058\r\n' , '312.6250\t76.064\t-145.282\t-11.641\r\n', '312.6667\t76.067\t-145.285\t-11.511\r\n', '312.7083\t76.070\t- 145.289\t-11.706\r\n'、'312.7500\t76.073\t-145.293\t-12.676\r\n'、'312.7917\t76.076\t-145.296\t-12.149\r\n' , '312.8333\t76.079\t-145.300\t-12.668\r\n', '312.8750\t76.083\t-145.302\t-12.647\r\n', '312.9167\t76.086\t- 145.303\t-14.065\r\n'、'312.9583\t76.088\t-145.301\t-16.202\r\n'、'313.0000\t76.091\t-145.300\t-12.760\r\n' , '313.0417\t76.093\t-145.298\t-12.589\r\n', '313.0833\t76.094\t-145.295\t-13.993\r\n', '313.1250\t76.095\t-145.293\t-16.798\r\n', '313.1667\t\t\t-16.497\r\n', '313.2083\t76.096\ t-145.288\t-15.034\r\n', '313.2500\t76.096\t-145.287\t-18.059\r\n', '313.2917\t76.097\t-145.287\t-20.666\r\ n', '313.3333\t76.097\t-145.287\t-20.770\r\n', '313.3750\t76.097\t-145.288\t-20.964\r\n', '313.4167\t76.097\ t-145.289\t-20.600\r\n', '313.4583\t76.097\t-145.291\t-20.396\r\n', '313.5000\t76.097\t-145.294\t-19.557\r\ n', '313.5417\t76.097\t-145.297\t-18.770\r\n', '313.5833\t76.096\t-145.304\t-18.020\r\n', '313.6250\t76.096\ t-145.312\t-19.198\r\n', '313.6667\t76.095\t-145.325\t-18.775\r\n', '313.7083\t76.095\t-145.342\t-18.278\r\ n','313.7500\t76.095\t-145.362\t-17.961\r\n','313.7917\t76.095\t-145.385\t-17。576\r\n', '313.8333\t76.096\t-145.409\t-16.719\r\n', '313.8750\t76.097\t-145.435\t-15.646\r\n', '313.9167\ t76.098\t-145.461\t-15.491\r\n', '313.9583\t76.099\t-145.486\t-14.799\r\n', '314.0000\t76.100\t-145.513\t- 14.522\r\n', '314.0417\t76.100\t-145.540\t-14.576\r\n', '314.0833\t76.101\t-145.568\t-14.140\r\n', '314.1250\ t76.101\t-145.596\t-13.958\r\n', '314.1667\t76.101\t-145.625\t-13.634\r\n', '314.2083\t76.102\t-145.657\t- 13.379\r\n'、'314.2500\t76.102\t-145.688\t-13.013\r\n'、'314.2917\t76.103\t-145.720\t-13.016\r\n'、'314.3333\ t76.105\t-145.750\t-13.360\r\n', '314.3750\t76.107\t-145.777\t-13.141\r\n', '314.4167\t76.109\t-145.803\t- 13.552\r\n'、'314.4583\t76.111\t-145.826\t-14.213\r\n'、'314.5000\t76.112\t-145。848\t-13.566\r\n'、'314.5417\t76.114\t-145.871\t-12.832\r\n'、'314.5833\t76.115\t-145.895\t-12.601\r\n' , '314.6250\t76.117\t-145.918\t-12.284\r\n', '314.6667\t76.118\t-145.942\t-12.289\r\n', '314.7083\t76.120\t- 145.968\t-12.763\r\n'、'314.7500\t76.123\t-145.993\t-12.713\r\n'、'314.7917\t76.125\t-146.017\t-12.337\r\n' , '314.8333\t76.128\t-146.038\t-12.178\r\n', '314.8750\t76.130\t-146.057\t-12.400\r\n', '314.9167\t76.132\t- 146.077\t-13.077\r\n'、'314.9583\t76.133\t-146.096\t-13.508\r\n'、'315.0000\t76.135\t-146.113\t-13.433\r\n' , '315.0417\t76.136\t-146.129\t-14.241\r\n', '315.0833\t76.137\t-146.145\t-15.048\r\n', '315.1250\t76.138\t- 146.160\t-15.399\r\n'、'315.1667\t76.139\t-146.176\t-16.294\r\n'、'315.2083\t76。140\t-146.192\t-16.038\r\n', '315.2500\t76.142\t-146.207\t-15.417\r\n', '315.2917\t76.143\t-146.223\t-15.777\ r\n'、'315.3333\t76.145\t-146.239\t-15.054\r\n'、'315.3750\t76.147\t-146.255\t-14.384\r\n'、'315.4167\t76。 149\t-146.271\t-14.369\r\n', '315.4583\t76.150\t-146.287\t-14.428\r\n', '315.5000\t76.152\t-146.306\t-14.181\ r\n'、'315.5417\t76.153\t-146.325\t-13.551\r\n'、'315.5833\t76.155\t-146.347\t-12.591\r\n'、'315.6250\t76。 157\t-146.369\t-11.820\r\n', '315.6667\t76.160\t-146.392\t-11.102\r\n', '315.7083\t76.162\t-146.415\t-10.715\ r\n'、'315.7500\t76.164\t-146.438\t-10.715\r\n'、'315.7917\t76.167\t-146.460\t-11.163\r\n'、'315.8333\t76。 169\t-146.483\t-11.244\r\n', '315.8750\t76.172\t-146.505\t-11.378\r\n', '315.9167\t76.174\t-146.526\t-11.568\r\n', '315.9583\t76.176\t-146.543\t-11.717\r\n', '316.0000\t76.177\t-146.558\ t-11.429\r\n', '316.0417\t76.178\t-146.570\t-10.944\r\n', '316.0833\t76.179\t-146.578\t-10.574\r\n', ' 316.1250\t76.179\t-146.583\t-10.430\r\n', '316.1667\t76.179\t-146.586\t-9.826\r\n', '316.2083\t76.179\t-146.587\ t-9.844\r\n', '316.2500\t76.179\t-146.586\t-9.465\r\n', '316.2917\t76.178\t-146.584\t-9.442\r\n', ' 316.3333\t76.177\t-146.578\t-10.033\r\n', '316.3750\t76.176\t-146.570\t-10.515\r\n', '316.4167\t76.175\t-146.558\ t-10.806\r\n', '316.4583\t76.173\t-146.542\t-10.977\r\n', '316.5000\t76.171\t-146.523\t-11.391\r\n', ' 316.5417\t76.169\t-146.501\t-11.801\r\n', '316.5833\t76.167\t-146.478\t-11.616\r\n', '316.6250\t76.164\t-146.454\t-12.508\r\n','316.6667\t76.161\t-146.433\t-12.669\r\n','316.7083\t76.158\t-146.411\ t-12.608\r\n', '316.7500\t76.156\t-146.390\t-13.306\r\n', '316.7917\t76.154\t-146.368\t-13.639\r\n', ' 316.8333\t76.152\t-146.346\t-13.308\r\n', '316.8750\t76.150\t-146.324\t-13.744\r\n', '316.9167\t76.149\t-146.302\ t-13.972\r\n', '316.9583\t76.147\t-146.278\t-14.126\r\n', '317.0000\t76.145\t-146.252\t-14.630\r\n', ' 317.0417\t76.142\t-146.225\t-15.240\r\n', '317.0833\t76.139\t-146.199\t-14.737\r\n', '317.1250\t76.135\t-146.173\ t-14.216\r\n', '317.1667\t76.131\t-146.147\t-14.232\r\n', '317.2083\t76.126\t-146.122\t-13.862\r\n', ' 317.2500\t76.121\t-146.097\t-13.860\r\n','317.2917\t76.116\t-146.073\t-13.940\r\n', '317.3333\t76.111\t-146.050\t-13.834\r\n', '317.3750\t76.107\t-146.028\t-13.782\r\n', '317.4167\t76.103\t- 146.006\t-13.990\r\n'、'317.4583\t76.099\t-145.987\t-14.089\r\n'、'317.5000\t76.096\t-145.968\t-14.482\r\n' , '317.5417\t76.092\t-145.952\t-14.872\r\n', '317.5833\t76.088\t-145.935\t-15.259\r\n', '317.6250\t76.085\t- 145.920\t-15.860\r\n', '317.6667\t76.081\t-145.907\t-17.011\r\n', '317.7083\t76.077\t-145.896\t-17.663\r\n' , '317.7500\t76.074\t-145.887\t-19.506\r\n', '317.7917\t76.073\t-145.880\t-21.081\r\n', '317.8333\t76.071\t- 145.873\t-22.499\r\n'、'317.8750\t76.071\t-145.867\t-23.459\r\n'、'317.9167\t76.071\t-145.863\t-24.380\r\n' , '317.9583\t76.070\t-145.859\t-25.220\r\n', '318.0000\t76.069\t-145.857\t-25.539\r\n'、'318.0417\t76.069\t-145.856\t-26.332\r\n'、'318.0833\t76.067\t-145.856\t-26.643\r\n'、'318.1250\ t76.066\t-145.857\t-26.639\r\n', '318.1667\t76.065\t-145.859\t-27.088\r\n', '318.2083\t76.064\t-145.862\t- 27.037\r\n', '318.2500\t76.064\t-145.867\t-25.966\r\n', '318.2917\t76.064\t-145.874\t-19.935\r\n', '318.3333\ t76.064\t-145.882\t-15.989\r\n', '318.3750\t76.066\t-145.893\t-14.794\r\n', '318.4167\t76.068\t-145.904\t- 14.406\r\n'、'318.4583\t76.070\t-145.916\t-14.544\r\n'、'318.5000\t76.072\t-145.927\t-14.930\r\n'、'318.5417\ t76.074\t-145.939\t-14.018\r\n', '318.5833\t76.076\t-145.953\t-13.664\r\n', '318.6250\t76.078\t-145.966\t- 13.409\r\n'、'318.6667\t76.080\t-145.979\t-13.406\r\n'、'318.7083\t76.082\t-145。994\t-13.108\r\n'、'318.7500\t76.084\t-146.008\t-13.157\r\n'、'318.7917\t76.087\t-146.020\t-13.055\r\n' , '318.8333\t76.089\t-146.032\t-13.254\r\n', '318.8750\t76.092\t-146.042\t-13.733\r\n', '318.9167\t\t\t- 14.241\r\n'、'318.9583\t\t\t-15.031\r\n'、'319.0000\t76.097\t-146.076\t-15.752\r\n'、'319.0417\t76.098\ t-146.088\t-15.423\r\n', '319.0833\t76.100\t-146.100\t-15.779\r\n', '319.1250\t76.101\t-146.110\t-16.486\r\ n', '319.1667\t76.101\t-146.121\t-17.901\r\n', '319.2083\t76.102\t-146.132\t-19.089\r\n', '319.2500\t\t\ t-19.720\r\n', '319.2917\t76.103\t-146.154\t-20.738\r\n', '319.3333\t76.103\t-146.163\t-21.220\r\n', ' 319.3750\t76.103\t-146.173\t-20.429\r\n','319.4167\t76.103\t-146.184\t-19.800\r\n','319。4583\t76.104\t-146.195\t-20.011\r\n', '319.5000\t76.104\t-146.205\t-19.883\r\n', '319.5417\t76.105\t-146.215\ t-19.511\r\n', '319.5833\t76.106\t-146.224\t-19.866\r\n', '319.6250\t76.107\t-146.232\t-19.880\r\n', ' 319.6667\t76.107\t-146.240\t-20.510\r\n', '319.7083\t76.108\t-146.247\t-20.994\r\n', '319.7500\t\t\t-21.313\ r\n'、'319.7917\t\t\t\r\n'、'319.8333\t76.110\t-146.264\t\r\n'、'319.8750\t76.110\t-146.269\t- 27.227\r\n'、'319.9167\t76.110\t-146.274\t-26.889\r\n'、'319.9583\t76.111\t-146.280\t\r\n'、'320.0000\t76。 111\t-146.285\t\r\n', '320.0417\t76.111\t-146.291\t-27.986\r\n', '320.0833\t76.112\t-146.296\t-29.207\r\ n', '320.1250\t76.112\t-146.303\t-29.108\r\n', '320.1667\t76.112\t-146.310\t-29.780\r\n', '320.2083\t76.113\t-146.316\t-30.054\r\n', '320.2500\t76.113\t-146.322\t-31.522\r\n', '320.2917\t\t\t-31.852\ r\n'、'320.3333\t76.113\t-146.332\t-31.729\r\n'、'320.3750\t76.114\t-146.337\t-32.797\r\n'、'320.4167\t76。 114\t-146.342\t-32.796\r\n', '320.4583\t76.114\t-146.347\t-32.531\r\n', '320.5000\t76.114\t-146.351\t-32.424\ r\n'、'320.5417\t76.114\t-146.357\t-32.667\r\n'、'320.5833\t76.114\t-146.363\t-31.566\r\n'、'320.6250\t76。 114\t-146.368\t-32.081\r\n', '320.6667\t76.115\t-146.374\t-32.989\r\n', '320.7083\t76.115\t-146.380\t-33.437\ r\n'、'320.7500\t76.115\t-146.386\t-33.727\r\n'、'320.7917\t76.114\t-146.391\t-33.791\r\n'、'320.8333\t76。 114\t-146.396\t-33.918\r\n','320.8750\t76.114\t-146.401\t-33.730\r\n','320。9167\t76.114\t-146.405\t-33.347\r\n', '320.9583\t76.114\t-146.409\t-33.708\r\n', '321.0000\t76.114\t-146.413\ t-33.516\r\n', '321.0417\t76.113\t-146.418\t-33.203\r\n', '321.0833\t76.113\t-146.422\t-32.659\r\n', ' 321.1250\t76.113\t-146.427\t-32.262\r\n', '321.1667\t76.113\t-146.432\t-32.998\r\n', '321.2083\t76.112\t-146.437\ t-33.472\r\n', '321.2500\t76.112\t-146.441\t-33.899\r\n', '321.2917\t76.111\t-146.445\t-34.124\r\n', ' 321.3333\t76.111\t-146.450\t-33.744\r\n','321.3750\t76.111\t-146.453\t-33.866\r\n','321.4167\t76.110\t-146.457\ t-33.152\r\n', '321.4583\t76.109\t-146.461\t-32.668\r\n', '321.5000\t76.108\t-146.465\t-32.466\r\n', ' 321.5417\t76.107\t-146.470\t-32.875\r\n', '321.5833\t76.107\t-146.475\t-32.387\r\n','321.6250\t76.106\t-146.479\t-31.119\r\n', '321.6667\t76.105\t-146.485\t-31.401\r\n', '321.7083\t76.104\t-146.489 \t-29.498\r\n', '321.7500\t76.103\t-146.494\t-28.689\r\n', '321.7917\t76.102\t-146.499\t-29.651\r\n', '321.8333\t76.102\t-146.504\t-30.905\r\n', '321.8750\t76.101\t-146.508\t-31.310\r\n', '321.9167\t\t\t-31.525 \r\n', '321.9583\t76.100\t-146.518\t-32.058\r\n', '322.0000\t76.099\t-146.524\t-32.428\r\n', '322.0417\t76 .098\t-146.530\t-32.521\r\n', '322.0833\t76.097\t-146.537\t-33.164\r\n', '322.1250\t76.096\t-146.545\t-32.562 \r\n', '322.1667\t76.094\t-146.553\t-32.464\r\n', '322.2083\t76.093\t-146.562\t-32.069\r\n', '322.2500\t76 .092\t-146.571\t-31.316\r\n', '322.2917\t76.091\t-146.580\t-32.461\r\n', '322.3333\t76.090\t-146.589\t-32.643\r\n'、'322.3750\t76.089\t-146.598\t-32.702\r\n'、'322.4167\t76.088\t-146.607\ t-32.637\r\n', '322.4583\t76.087\t-146.615\t-32.580\r\n', '322.5000\t76.086\t-146.625\t-32.580\r\n', ' 322.5417\t76.086\t-146.635\t-32.323\r\n', '322.5833\t\t\t-32.291\r\n', '322.6250\t76.084\t-146.655\t-32.518\ r\n', '322.6667\t\t\t-32.515\r\n', '322.7083\t76.083\t-146.678\t-32.259\r\n', '322.7500\t76.083\t- 146.689\t-32.134\r\n', '322.7917\t76.083\t-146.701\t-31.880\r\n', '322.8333\t76.084\t-146.711\t-31.536\r\n' , '322.8750\t76.084\t-146.722\t-31.917\r\n', '322.9167\t76.084\t-146.733\t-31.821\r\n', '322.9583\t76.084\t- 146.744\t-32.105\r\n'、'323.0000\t76.084\t-146.755\t-32.233\r\n'、'323.0417\t\t\t-32。211\r\n', '323.0833\t\t\t-31.583\r\n', '323.1250\t\t\t-30.926\r\n', '323.1667\t\t\t-30.032\ r\n', '323.2083\t\t\t-29.510\r\n', '323.2500\t\t\t-30.275\r\n', '323.2917\t\t\t-30.046\r\ n', '323.3333\t\t\t-29.560\r\n', '323.3750\t\t\t-30.000\r\n', '323.4167\t\t\t-29.782\r\n' , '323.4583\t\t\t-29.769\r\n', '323.5000\t\t\t-29.438\r\n', '323.5417\t\t\t-28.246\r\n', ' 323.5833\t\t\t-28.572\r\n'、'323.6250\t\t\t-28.968\r\n'、'323.6667\t\t\t-28.452\r\n'、'323.7083\ t\t\t-28.746\r\n', '323.7500\t\t\t-28.419\r\n', '323.7917\t\t\t-28.530\r\n', '323.8333\t\ t\t-28.225\r\n', '323.8750\t\t\t-27.149\r\n',1667\t\t\t-30.032\r\n', '323.2083\t\t\t-29.510\r\n', '323.2500\t\t\t-30.275\r\n', '323.2917\ t\t\t-30.046\r\n', '323.3333\t\t\t-29.560\r\n', '323.3750\t\t\t-30.000\r\n', '323.4167\t\ t\t-29.782\r\n', '323.4583\t\t\t-29.769\r\n', '323.5000\t\t\t-29.438\r\n', '323.5417\t\t\ t-28.246\r\n', '323.5833\t\t\t-28.572\r\n', '323.6250\t\t\t-28.968\r\n', '323.6667\t\t\t- 28.452\r\n', '323.7083\t\t\t-28.746\r\n', '323.7500\t\t\t-28.419\r\n', '323.7917\t\t\t-28.530\ r\n', '323.8333\t\t\t-28.225\r\n', '323.8750\t\t\t-27.149\r\n',1667\t\t\t-30.032\r\n', '323.2083\t\t\t-29.510\r\n', '323.2500\t\t\t-30.275\r\n', '323.2917\ t\t\t-30.046\r\n', '323.3333\t\t\t-29.560\r\n', '323.3750\t\t\t-30.000\r\n', '323.4167\t\ t\t-29.782\r\n', '323.4583\t\t\t-29.769\r\n', '323.5000\t\t\t-29.438\r\n', '323.5417\t\t\ t-28.246\r\n', '323.5833\t\t\t-28.572\r\n', '323.6250\t\t\t-28.968\r\n', '323.6667\t\t\t- 28.452\r\n', '323.7083\t\t\t-28.746\r\n', '323.7500\t\t\t-28.419\r\n', '323.7917\t\t\t-28.530\ r\n', '323.8333\t\t\t-28.225\r\n', '323.8750\t\t\t-27.149\r\n','323.4167\t\t\t-29.782\r\n', '323.4583\t\t\t-29.769\r\n', '323.5000\t\t\t-29.438\r\n', '323.5417 \t\t\t-28.246\r\n', '323.5833\t\t\t-28.572\r\n', '323.6250\t\t\t-28.968\r\n', '323.6667\t \t\t-28.452\r\n', '323.7083\t\t\t-28.746\r\n', '323.7500\t\t\t-28.419\r\n', '323.7917\t\t \t-28.530\r\n', '323.8333\t\t\t-28.225\r\n', '323.8750\t\t\t-27.149\r\n','323.4167\t\t\t-29.782\r\n', '323.4583\t\t\t-29.769\r\n', '323.5000\t\t\t-29.438\r\n', '323.5417 \t\t\t-28.246\r\n', '323.5833\t\t\t-28.572\r\n', '323.6250\t\t\t-28.968\r\n', '323.6667\t \t\t-28.452\r\n', '323.7083\t\t\t-28.746\r\n', '323.7500\t\t\t-28.419\r\n', '323.7917\t\t \t-28.530\r\n', '323.8333\t\t\t-28.225\r\n', '323.8750\t\t\t-27.149\r\n',8750\t\t\t-27.149\r\n',8750\t\t\t-27.149\r\n',

4

2 回答 2

1

仍然不相信您的N实例是什么,但给定一个 Python 列表,您可以检查对象的类型并排除任何字符串。

>>> a = [1, 3, 'hello', 4, 5, 'world!']
>>> [el for el in a if not isinstance(el, basestring)]
[1, 3, 4, 5]
于 2012-12-07T13:35:09.107 回答
0

如果我理解正确,您想将数字提取到列表中并摆脱其他所有内容。我认为这可以帮助你:

In [45]: s = "[Julian Day\tLatitude\tLongitude\tTs\r\n304.0833\t75.714\t-144.272\t-26.091\r\n]"

In [46]: p = "(-?\d+\.?\d*)(?:\]|\t|\n|\r)"

In [47]: [float(x) for x in re.findall(p,s)]
Out[47]: [304.0833, 75.714, -144.272, -26.091]

我按原样使用findall该返回列表,split但更适合我正在做的事情。然后使用列表推导将返回的字符串列表转换为浮点数列表。

于 2012-12-07T15:16:55.947 回答