#include <Cocoa/Cocoa.h>
#include <iostream>
using std::cout; using std::endl;
int num = 1;
// Objective-C++
NSLog(@"Objective-C++ num %d",num);
// C++
cout << "C++ num " << num << endl;
--------------------------------------------------
出力
--------------------------------------------------
Objective-C++ num 1
C++ num 1
<該当箇所のみ>
import openpyxl, csv
def csv_to_xlsx(path):
# xlsxファイル名作成
xlsx_path = path.split('.')[0] + '.xlsx'
df = pd.read_csv(path)
df.to_excel(xlsx_path, encoding='utf-8', index = False, header = False)
return "csv_to_xlsx sccess"
def csv_to_list(path):
# csvファイルを読み込みリスト化
with open(path, encoding='utf-8-sig') as f:
reader = csv.reader(f)
l = [row for row in reader]
# ネストになっているため平滑化
csv_list = [e for ele in l for e in ele]
return str(csv_list)