readtable does not import headers properly while reading csv file

43 ビュー (過去 30 日間)
Romain
Romain 2025 年 1 月 5 日
回答済み: Paul 2025 年 1 月 5 日
Dear all,
I have a problem with readtable. I have a simple data file that contains a first column of dates (without header), and subsequent columns that are numeric (all with a header).
In Excel format, the file seems to be imported properly: the first column is given a default header Var1, and the header is read properly for the other columns. Strangely though, it is read as cell array of chars.
Exactly the same file converted to csv is not read correctly. Readtable now treats the first row as numeric with NaN entries, and thus creates default headers only (image 2).
I have tried a couple of strategies to solve that such as using options ('NumHeaderLines',0) or ('ReadVariableNames',true), but it did not work.
So I have 3 questions:
1. how can I solve this and have the headers read properly, even in csv format?
2. Excel file yields cell arrays, while csv yields regular numeric arrays. How comes?
3. Is there a way I can obtain what I consider a reasonable outcome, that is: a table with first column as chars or dates, other columns as numeric, and headers properly imported? Ideally in a generic way, without too much customization, as I expect readtable should just do that regularly.
I am using Matlab 2024a, '24.1.0.2537033 (R2024a)'
Thank you very much.

回答 (1 件)

Paul
Paul 2025 年 1 月 5 日
dbtype data.csv
1 ,ffrate,inf,gap,proxy_1,proxy_2 2 1955-03-31,1.35,-0.519866320089122,2.11233683650112,0.252,-0.476 3 1955-06-30,1.64,-0.85374907201188,3.1059483135487,-0.942,1.259 4 1955-09-30,2.18,0.14919806042522502,3.8394129823774703,-0.853,0.631 5 1955-12-31,2.48,0.37355248412402503,3.7837595642113198,0.098,-0.298 6 1956-03-31,2.5,0.37327360955581,2.7021286936581403,-0.020,-0.139 7 1956-06-30,2.71,1.64732309996255,2.88187688395486,0.066,-0.588 8 1956-09-30,2.95,1.86219739292365,2.0977709212581996,0.252,-0.476 9 1956-12-31,2.94,2.82843319687383,3.04682807495794,-0.942,1.259 10 1957-03-31,2.96,3.60728895500185,2.9195384494912404,-0.853,0.631 11 1957-06-30,3.0,3.53591160220995,1.8703852193939399,0.098,-0.298 12 1957-09-30,3.47,3.54661791590493,2.01233545187303,-0.020,-0.139 13 1957-12-31,2.98,3.04017372421281,0.0837701659772756,0.066,-0.588 14 1958-03-31,1.2,3.62526920315866,-3.3579288169422,0.250,1.022 15 1958-06-30,0.93,2.84596229099965,-3.59013433260626,-0.686,-0.210 16 1958-09-30,1.76,2.0833333333333304,-2.2449557729696603,-0.047,-0.730 17 1958-12-31,2.42,1.75623463294696,-0.8935104167524621,-0.287,-0.559 18 1959-03-31,2.8,0.34638032559749893,0.0602623520851725,0.240,-1.068 19 1959-06-30,3.39,0.6918021445866459,1.33327897369632,-0.170,-0.104 20 1959-09-30,3.76,1.1760636457973,0.38571520026845396,0.924,0.282 21 1959-12-31,3.99,1.51881256472213,-0.336310151971574,0.805,0.154 22 1960-03-31,3.84,1.51881256472213,0.8673134897353241,-0.553,0.060 23 1960-06-30,3.32,1.7176228100309199,-0.677819145812045,0.740,0.358 24 1960-09-30,2.6,1.23076923076923,-1.1834410747533701,-0.485,-0.868 25 1960-12-31,1.98,1.36008160489629,-3.40288889671128,0.973,0.687 26 1961-03-31,2.02,1.46208772526351,-3.70270302331357,0.267,0.433 27 1961-06-30,1.73,0.7767646065518421,-2.99432639175367,0.223,-0.203 28 1961-09-30,1.88,1.24957784532253,-2.0986149231641003,-0.467,0.639 29 1961-12-31,2.33,0.670915800067101,-1.15397628509949,0.777,-0.292 30 1962-03-31,2.85,1.1058981233243999,-0.395369103712288,0.307,0.258 31 1962-06-30,2.68,1.23994638069705,-0.5142081861024811,0.345,0.340 32 1962-09-30,2.9,1.46764509673116,-0.328201125564153,0.750,0.259 33 1962-12-31,2.93,1.23292235921359,-1.03770458828263,1.208,-0.442 34 1963-03-31,2.98,1.12694729864103,-0.998427625089183,0.085,0.117 35 1963-06-30,2.99,1.3240648791790801,-0.940761254465188,0.521,0.037 36 1963-09-30,3.48,0.9861932938855921,0.163507508208573,-0.040,-0.910 37 1963-12-31,3.38,1.6458196181698501,-0.258794137797397,0.264,0.392 38 1964-03-31,3.43,1.4093739757456598,0.763713697395187,-0.175,-0.651 39 1964-06-30,3.5,1.3067624959163702,0.766304918909705,0.118,-0.816 40 1964-09-30,3.45,1.171875,1.2417668571179,0.113,-0.600 41 1964-12-31,3.85,1.19818652849741,0.47054941130036293,0.916,-0.173 42 1965-03-31,4.05,1.19586296056883,1.78316878901643,-0.712,0.158 43 1965-06-30,4.05,1.9348597226701,1.97731873433792,-0.060,0.268 44 1965-09-30,4.02,1.73745173745175,3.11004901993496,-1.171,-0.524 45 1965-12-31,4.32,1.92,4.33647380749922,-0.858,-0.352 46 1966-03-31,4.66,2.77866496327052,5.7046988490738,-0.737,0.448 47 1966-06-30,5.17,2.43593799430561,4.90011261564657,0.483,-0.923 48 1966-09-30,5.4,3.57368753953194,4.620497348388151,-0.608,0.461 49 1966-12-31,5.4,3.3594976452119303,4.33062838887537,-0.560,-0.115 50 1967-03-31,4.53,2.54816656308266,4.10293808182514,-0.923,-1.359 51 1967-06-30,3.98,2.8412600370599,3.03150943962565,-0.668,-0.073 52 1967-09-30,3.99,2.59541984732825,2.8774658387274505,-1.068,-0.092 53 1967-12-31,4.51,3.28068043742405,2.5133350710282003,0.837,0.729 54 1968-03-31,5.05,3.9393939393939306,3.4528350267258503,0.297,-0.160 55 1968-06-30,6.07,4.2042042042042205,4.0332767273025505,0.428,-0.407 56 1968-09-30,5.78,4.46428571428571,3.6811367221819595,-0.431,0.232 57 1968-12-31,6.02,4.70588235294118,2.93299599231911,0.170,-0.122 58 1969-03-31,6.79,5.24781341107873,3.42832411537126,-0.041,-0.100 59 1969-06-30,8.9,5.47550432276657,2.68925808151413,2.301,-0.481 60 1969-09-30,9.15,5.6980056980057,2.37540048272579,0.154,0.043 61 1969-12-31,8.97,5.8988764044943895,0.9452888797325469,0.446,-0.225 62 1970-03-31,7.76,6.09418282548475,-0.0830248409505211,-0.430,-0.034 63 1970-06-30,7.61,6.01092896174862,-0.770000528348171,0.133,0.964 64 1970-09-30,6.29,5.660377358490571,-0.6512785951977901,-0.886,0.332 65 1970-12-31,4.9,5.570291777188309,-2.4729661943472205,-0.412,0.316 66 1971-03-31,3.71,4.43864229765014,-0.5906332648311321,-1.773,-1.069 67 1971-06-30,4.91,4.38144329896908,-0.8266173826235249,1.315,-0.450 68 1971-09-30,5.55,4.0816326530612095,-0.7894171885941271,0.887,-0.220 69 1971-12-31,4.14,3.2663316582914703,-1.3369751796729599,-1.057,-0.324 70 1972-03-31,3.83,3.5,-0.320628761132946,-0.919,0.390 71 1972-06-30,4.46,2.9629629629629703,1.12806105299218,-0.530,-0.705 72 1972-09-30,4.87,3.18627450980393,1.2616950384285,-0.257,-0.016 73 1972-12-31,5.33,3.40632603406326,2.1228808158000003,-0.421,-0.335 74 1973-03-31,7.09,4.830917874396139,3.7896741147310196,0.422,1.193 75 1973-06-30,8.49,5.99520383693046,4.02333766961136,0.979,0.593 76 1973-09-30,10.78,7.36342042755345,2.5905021548572598,2.633,0.801 77 1973-12-31,9.95,8.94117647058823,2.66648511874287,-0.741,1.147 78 1974-03-31,9.35,10.1382488479263,0.897353694084734,-0.190,1.217 79 1974-06-30,11.93,10.8597285067873,0.258469692309567,2.513,0.966 80 1974-09-30,11.34,11.946902654867301,-1.53347917704767,-0.079,1.105 81 1974-12-31,8.53,12.095032397408199,-2.7310970168023396,-2.549,0.192 82 1975-03-31,5.54,10.4602510460251,-4.6864048685335,-2.415,-0.576 83 1975-06-30,5.55,9.18367346938776,-4.75391952872478,-0.431,-0.736 84 1975-09-30,6.24,7.90513833992095,-3.86660928561085,-0.204,-0.750 85 1975-12-31,5.2,7.129094412331411,-3.3146936288521403,-1.131,0.365 86 1976-03-31,4.84,6.06060606060607,-1.8871145011353,-1.460,-0.822 87 1976-06-30,5.48,5.981308411214959,-1.92035184284495,1.117,0.007 88 1976-09-30,5.25,5.49450549450549,-2.15097869430899,-0.217,0.448 89 1976-12-31,4.65,5.03597122302158,-2.2164253433092997,-0.383,-0.004 90 1977-03-31,4.69,6.428571428571429,-1.8572003818662899,-0.710,2.078 91 1977-06-30,5.39,6.70194003527336,-0.766895965378733,0.062,-0.150 92 1977-09-30,6.14,6.4236111111111,0.19257917412786,0.237,-0.339 93 1977-12-31,6.56,6.6780821917808195,-0.645099692677573,0.955,0.157 94 1978-03-31,6.79,6.375838926174491,-1.17686749546427,0.851,0.247 95 1978-06-30,7.6,7.43801652892562,1.75775403480057,-1.027,0.895 96 1978-09-30,8.45,8.48287112561175,1.87896318138741,0.353,0.893 97 1978-12-31,10.03,8.98876404494383,2.33528313054414,0.878,0.207 98 1979-03-31,10.09,10.2523659305994,1.59529113138608,0.134,1.106 99 1979-06-30,10.29,11.076923076923098,0.8260289602037459,-0.155,0.737 100 1979-09-30,11.43,11.879699248120302,0.7481076426797428,1.163,0.725 101 1979-12-31,13.78,13.2547864506627,0.234935073156005,2.256,2.155 102 1980-03-31,17.19,14.592274678111599,-0.145938035791746,3.601,1.280 103 1980-06-30,9.47,14.2659279778393,-2.80952431003137,-6.025,0.957 104 1980-09-30,10.87,12.768817204301099,-3.45696931756158,0.064,-0.882 105 1980-12-31,18.9,12.3537061118336,-2.2210902616987402,7.385,-0.947 106 1981-03-31,14.7,10.6117353308365,-0.932809655723223,-2.935,-0.978 107 1981-06-30,19.1,9.696969696969699,-2.3248692510398703,4.699,-1.094 108 1981-09-30,15.87,10.965435041716301,-1.8482889190117902,-2.489,1.370 109 1981-12-31,12.37,8.91203703703702,-3.6278304107907795,-2.638,-1.323 110 1982-03-31,14.68,6.8848758465011395,-5.83891869134385,3.393,-1.742 111 1982-06-30,14.15,7.18232044198895,-6.132922978732211,1.065,0.036 112 1982-09-30,10.31,4.940923737916231,-7.214488530384691,-2.409,-1.281 113 1982-12-31,8.95,3.82571732199788,-7.90316137202428,-0.280,-0.248 114 1983-03-31,8.77,3.5902851108764398,-7.41214362679855,0.260,0.362 115 1983-06-30,8.98,2.4742268041237203,-6.050145080617981,0.383,-0.837 116 1983-09-30,9.45,2.76356192425794,-4.9414080984180995,1.343,0.217 117 1983-12-31,9.47,3.7871033776867997,-3.7621424029372,1.003,0.800 118 1984-03-31,9.91,4.89296636085628,-2.71812680501935,1.070,0.607 119 1984-06-30,11.06,4.32595573440644,-1.90511880215956,2.158,-1.267 120 1984-09-30,11.3,4.2828685258964105,-1.8411742556138102,0.755,0.067 121 1984-12-31,8.38,4.04339250493096,-1.9239720933926698,-2.200,-0.308 122 1985-03-31,8.58,3.79008746355684,-1.8590108416201898,0.254,0.143 123 1985-06-30,7.53,3.66441658630665,-1.87767262952552,-0.259,0.463 124 1985-09-30,7.92,3.2473734479465097,-1.2597266954651298,0.405,-0.378 125 1985-12-31,8.27,3.7914691943127994,-1.39157493451705,0.866,0.754 126 1986-03-31,7.48,2.15355805243445,-1.3235878998143502,-0.680,-2.157 127 1986-06-30,6.92,1.76744186046512,-1.7164850869778299,0.065,-0.266 128 1986-09-30,5.89,1.75763182238668,-1.60533767953446,-0.963,0.175 129 1986-12-31,6.91,1.1872146118721398,-1.89400231416704,0.729,-1.186 130 1987-03-31,6.13,2.8414298808432696,-1.966948227567,0.114,1.247 131 1987-06-30,6.73,3.7477148080438702,-1.7020267188253502,0.294,0.461 132 1987-09-30,7.22,4.27272727272728,-1.63097345358524,0.982,0.186 133 1987-12-31,6.77,4.33212996389891,-0.724025407366893,-0.660,-0.467 134 1988-03-31,6.58,3.8324420677361806,-0.9778189868959509,0.351,-0.306 135 1988-06-30,7.51,3.9647577092510997,-0.44223490191758097,1.093,0.135 136 1988-09-30,8.19,4.1848299912816,-0.6131558539416689,0.937,-0.472 137 1988-12-31,8.76,4.41176470588236,-0.0421367954053359,0.708,-0.471 138 1989-03-31,9.85,4.892703862660951,0.22887035120122198,0.876,0.596 139 1989-06-30,9.53,5.1694915254237195,0.255451344833993,-0.432,-0.102 140 1989-09-30,9.02,4.43514644351464,0.26797662181252596,-0.296,-0.453 141 1989-12-31,8.45,4.63960231980116,-0.25408705085711,-0.388,-0.271 142 1990-03-31,8.28,5.23731587561374,0.127192690773833,-0.088,0.692 143 1990-06-30,8.29,4.67365028203063,-0.20495857683561702,0.098,-0.542 144 1990-09-30,8.2,6.1698717948718,-0.811015020009073,0.832,1.809 145 1990-12-31,7.31,6.25494853523357,-2.35723182057237,0.077,0.245 146 1991-03-31,6.12,4.821150855365491,-3.43633741462484,-0.490,-0.713 147 1991-06-30,5.9,4.69591993841416,-3.2914513480817904,-0.412,-0.176 148 1991-09-30,5.45,3.3962264150943398,-3.40093627088758,-0.180,-0.923 149 1991-12-31,4.43,2.9806259314456005,-3.6591865021205403,-0.713,0.376 150 1992-03-31,3.98,3.18991097922847,-3.1032390313668197,-0.185,-0.112 151 1992-06-30,3.76,3.01470588235294,-2.65805760096491,0.285,0.245 152 1992-09-30,3.22,2.992700729927,-2.314744246218,-0.970,-0.120 153 1992-12-31,2.92,2.9667149059334506,-1.9214586443247899,-0.323,-0.036 154 1993-03-31,3.07,3.01941049604602,-2.3866672905904203,-0.245,-0.039 155 1993-06-30,3.04,2.99785867237689,-2.45861078783254,0.638,0.527 156 1993-09-30,3.09,2.76399716513112,-2.6363656746403796,-0.115,-0.227 157 1993-12-31,2.96,2.8109627547434997,-1.96530274837652,-0.606,0.338 158 1994-03-31,3.34,2.65177948360083,-1.67143706785824,0.070,-0.443 159 1994-06-30,4.25,2.49480249480249,-1.0011535429433,0.460,-0.141 160 1994-09-30,4.73,2.96551724137932,-1.0917631864911899,1.164,0.639 161 1994-12-31,5.45,2.59740259740259,-0.634907502663944,0.607,-0.712 162 1995-03-31,5.98,2.78721957851801,-0.956307220153808,0.994,-0.016 163 1995-06-30,6.0,3.0425963488843797,-1.33680636432952,0.576,0.074 164 1995-09-30,5.8,2.5452109845947595,-1.1760202405642501,0.408,-0.275 165 1995-12-31,5.6,2.5316455696202596,-1.19415230027234,-0.412,-0.132 166 1996-03-31,5.31,2.84391534391535,-1.1508810742053999,-0.187,0.112 167 1996-06-30,5.27,2.82152230971128,-0.24404148089042801,0.149,-0.420 168 1996-09-30,5.3,3.00457217504898,-0.138915195431954,0.541,-0.133 169 1996-12-31,5.29,3.37881741390513,0.0635949993509774,-0.440,0.058 170 1997-03-31,5.39,2.7652733118971096,-0.16424887064469598,0.400,-0.674 171 1997-06-30,5.56,2.23356732610083,0.580242788390436,-0.145,-1.144 172 1997-09-30,5.54,2.21940393151554,0.884204371118653,-0.166,-0.198 173 1997-12-31,5.5,1.69704588309241,0.7721923950170649,0.315,-1.341 174 1998-03-31,5.49,1.3767209011263999,0.77912804442725,0.344,-0.316 175 1998-06-30,5.56,1.62297128589265,0.691778234542933,0.458,-0.061 176 1998-09-30,5.51,1.4267990074441799,0.9201189814074309,0.037,-0.593 177 1998-12-31,4.68,1.6069221260815802,1.50389767532101,-1.084,-0.400 178 1999-03-31,4.81,1.7283950617284,1.40669967143076,-0.022,0.054 179 1999-06-30,4.76,1.9656019656019599,1.13004879512025,0.056,-0.030 180 1999-09-30,5.22,2.62996941896025,1.3888543149422101,0.234,0.094 181 1999-12-31,5.3,2.67639902676399,2.03320557972916,-0.195,-0.389 182 2000-03-31,5.85,3.76213592233009,1.33145222194351,0.780,0.680 183 2000-06-30,6.53,3.73493975903614,2.1398150002152403,0.248,-0.479 184 2000-09-30,6.52,3.4564958283670895,1.28399871245062,0.090,-0.624 185 2000-12-31,6.4,3.43601895734596,0.979028879258919,0.129,-0.533 186 2001-03-31,5.31,2.98245614035087,-0.18389595077562898,-0.453,-0.486 187 2001-06-30,3.97,3.1939605110336804,-0.421129656932672,-0.998,0.113 188 2001-09-30,3.07,2.59216589861751,-1.59704954123507,-0.138,-0.636 189 2001-12-31,1.82,1.6036655211913002,-2.04234721023999,-1.342,-0.904 190 2002-03-31,1.73,1.36286201022147,-1.86106776931199,-0.315,-0.025 191 2002-06-30,1.75,1.06921778277997,-1.91404590152125,-0.139,-0.621 192 2002-09-30,1.75,1.51600224592926,-2.10488944110558,0.287,0.397 193 2002-12-31,1.24,2.48027057497182,-2.5651417481437297,0.026,1.536 194 2003-03-31,1.25,3.0252100840336205,-2.62938440546031,-0.280,0.473 195 2003-06-30,1.22,1.94877505567929,-2.40005391511619,-0.419,-0.631 196 2003-09-30,1.01,2.37831858407079,-1.35684687552113,-0.767,0.479 197 2003-12-31,0.98,2.03520352035203,-0.8467875817703159,-0.581,-0.063 198 2004-03-31,1.0,1.74007612833061,-0.949496350912265,-0.918,-0.341 199 2004-06-30,1.03,3.1676679410158397,-0.8364115373621279,-0.172,1.867 200 2004-09-30,1.61,2.53916801728796,-0.5537514927377939,0.109,-0.277 201 2004-12-31,2.16,3.34231805929919,-0.220205835237452,0.347,0.902 202 2005-03-31,2.63,3.2068412613575603,0.23434161076605897,-0.205,-0.189 203 2005-06-30,3.04,2.54102699841185,0.0699309604774509,0.344,-0.976 204 2005-09-30,3.62,4.741833508956799,0.34734829174376103,0.189,2.180 205 2005-12-31,4.16,3.33854981742306,0.38412342334435706,0.089,-1.169 206 2006-03-31,4.59,3.4179181771103,1.1384729840980201,-0.075,-0.099 207 2006-06-30,4.99,4.18172431595252,0.8126488186646078,0.598,0.753 208 2006-09-30,5.25,2.01207243460765,0.436106155935471,-0.087,-2.470 209 2006-12-31,5.24,2.52397778899546,0.785726760217192,-0.239,0.213 210 2007-03-31,5.26,2.7981972959439303,0.525388815349257,0.027,0.199 211 2007-06-30,5.25,2.6927651139742297,0.607348372938478,0.152,-0.468 212 2007-09-30,4.94,2.8338264299802702,0.661100180718256,-0.485,-0.049 213 2007-12-31,4.24,4.10881339241753,0.7875737309132349,-0.696,1.115 214 2008-03-31,2.61,3.97490355013444,-0.262241523697885,-1.531,0.808 215 2008-06-30,2.0,4.935966105947861,-0.19875821907218502,-1.425,1.110 216 2008-09-30,1.81,4.95331987513607,-1.15977203418283,-0.291,0.040 217 2008-12-31,0.16,-0.0222280025538542,-3.6811096586228196,-0.685,-4.763 218 2009-03-31,0.18,-0.44647876766238304,-5.105959839779111,0.659,-0.063 219 2009-06-30,0.21,-1.22917461821092,-5.5593822687325,0.693,-0.621 220 2009-09-30,0.15,-1.37794286288647,-5.512739305536491,0.133,-0.448 221 2009-12-31,0.12,2.81412312320836,-4.76487589423939,-0.031,4.230 222 2010-03-31,0.16,2.28617143932799,-4.68931557436618,0.191,-0.682 223 2010-06-30,0.18,1.12156059406863,-4.112023396511041,-0.124,-0.714 224 2010-09-30,0.19,1.11831224723318,-3.72133424703323,0.165,-0.125 225 2010-12-31,0.18,1.43779302221793,-3.56657801627631,-0.298,0.864 226 2011-03-31,0.14,2.61924151035412,-4.13760905187267,0.403,1.747 227 2011-06-30,0.09,3.5023181506360497,-3.80430131427207,-0.430,1.277 228 2011-09-30,0.08,3.81262169281869,-4.19394736349933,0.335,0.479 229 2011-12-31,0.07,3.0620668384193905,-3.4575680745399304,-0.543,-0.320 230 2012-03-31,0.13,2.5828752813321,-3.08512141382203,-0.252,0.109 231 2012-06-30,0.16,1.6538704482976399,-3.06191827769572,-0.164,-0.828 232 2012-09-30,0.14,1.94971689828196,-3.3313481416327595,-0.218,0.194 233 2012-12-31,0.16,1.75950497968955,-3.6261463196812795,-0.053,0.081 234 2013-03-31,0.14,1.5187472411246299,-3.18435190516344,-0.611,0.613 235 2013-06-30,0.09,1.7157935271568798,-3.4815155700044604,-0.054,0.667 236 2013-09-30,0.08,1.0947341081747999,-3.1453576711455296,-0.159,-0.652 237 2013-12-31,0.09,1.5128383667573402,-2.7986941261465494,-0.108,0.207 238 2014-03-31,0.08,1.6126949139408002,-3.50063789313437,0.864,0.250 239 2014-06-30,0.1,2.05898169459442,-2.6287759707136096,-0.616,0.823 240 2014-09-30,0.09,1.68405097112321,-1.8828725642263702,-0.052,-0.451 241 2014-12-31,0.12,0.6531213919623101,-1.7761729493948,-0.340,-0.358 242 2015-03-31,0.11,-0.0220312844238787,-1.2911229144002199,-0.431,-0.743 243 2015-06-30,0.13,0.17957180975505602,-1.06939512589382,-0.250,-0.314 244 2015-09-30,0.14,0.00884296163417366,-1.15085814666355,-0.286,-1.044 245 2015-12-31,0.24,0.638724751536489,-1.4223077252127,0.221,0.616 246 2016-03-31,0.36,0.8916160965521971,-1.28837116764697,-0.290,0.620 247 2016-06-30,0.38,1.07928653479594,-1.39493753540405,0.075,-0.305 248 2016-09-30,0.4,1.54864462016522,-1.2649087342853502,-0.020,0.519 249 2016-12-31,0.54,2.05079891151198,-1.04550499445061,0.101,0.643 250 2017-03-31,0.79,2.3882728494623597,-0.8843513786202221,-0.221,0.533 251 2017-06-30,1.04,1.66346129829907,-0.862211830496506,-0.461,-0.737 252 2017-09-30,1.15,2.2286628851958703,-0.555002343177962,-0.329,0.301 253 2017-12-31,1.3,2.10149317705049,-0.0318971276794431,-0.206,-0.108 254 2018-03-31,1.51,2.3592297531239,0.455823358487293,-0.209,-0.087 255 2018-06-30,1.82,2.83926655692864,0.668481331598537,0.133,0.188 256 2018-09-30,1.95,2.28431440148286,0.724778191607645,-0.236,-0.270 257 2018-12-31,2.27,1.9201892337003899,0.57947034914274,0.432,-0.302 258 2019-03-31,2.41,1.85558499020107,0.8274992790566759,0.117,-0.158 259 2019-06-30,2.38,1.70056380200039,0.715465002742848,-0.862,-0.437 260 2019-09-30,2.04,1.72454130532193,0.870835439009005,-0.710,-0.336 261 2019-12-31,1.55,2.26144883224485,0.988058060651708,-0.555,0.273 262 2020-03-31,0.65,1.51172353008298,-0.7472702801193281,0.117,-0.158 263 2020-06-30,0.08,0.727812295682057,-10.0796433226415,-0.862,-0.437 264 2020-09-30,0.09,1.40996055073052,-3.78112111825184,-0.710,-0.336 265 2020-12-31,0.09,1.3001398124731398,-3.1921751958364397,-0.555,0.273
T = readtable('data.csv','LeadingDelimitersRule','keep','ReadVariableNames',true);
T(1:5,:)
ans = 5x6 table
Var1 ffrate inf gap proxy_1 proxy_2 __________ ______ ________ ______ _______ _______ 1955-03-31 1.35 -0.51987 2.1123 0.252 -0.476 1955-06-30 1.64 -0.85375 3.1059 -0.942 1.259 1955-09-30 2.18 0.1492 3.8394 -0.853 0.631 1955-12-31 2.48 0.37355 3.7838 0.098 -0.298 1956-03-31 2.5 0.37327 2.7021 -0.02 -0.139

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by