필터 지우기
필터 지우기

replace a numerical with a string within a csv file.

조회 수: 1 (최근 30일)
karan goyal
karan goyal 2019년 2월 6일
댓글: karan goyal 2019년 2월 7일
FUTAvgTradePrice
19000 FUTTotalTradeQty FUTBestBidVol FUTBestBid FUTBestAskVol
26707 18000 3000 26645 3000
26678 9000 3000 26660 3000
26657 6000 6000 26610 3000
26660 3000 6000 26620 3000
26650 6000 6000 26635 3000
26650 0 3000 26630 3000
26660 3000 6000 26635 3000
26639 9000 9000 26610 6000
IN the above csv file i want to replace 19000 in SECOND ROW AND FIRST COLUMN WITH THE string FUTAvgTradePrice Which is present in the FIRST ROW AND FIRST COLUMN.HOW TO DO IT??(also the file is very big having 45000+ rows and 40+ columns).
ALSO I WANT TO DELETE THE FIRST ROW AFTER THIS HAS BEEN DONE.
  댓글 수: 2
madhan ravi
madhan ravi 2019년 2월 6일
Upload your csv file.
karan goyal
karan goyal 2019년 2월 7일
not able to upload

댓글을 달려면 로그인하십시오.

채택된 답변

Gani
Gani 2019년 2월 6일
편집: Gani 2019년 2월 6일
Example:
[~,~,raw ]= xlsread('C:\Test.csv');
raw{2,1} ='FUTAvgTradePrice'; % setting value
raw(1, :) = []; % deleting first row
xlswrite('C:\Test.csv', raw); % saving it again

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by