[英]Transforming Complex Flat File using Python
I have a flat file which has format something like below,我有一个格式如下的平面文件,
Country{Year{Working_Days_Month1{Working_Days_Month2...{Working_Days_Month12
IND{2019{111110011111001111100111110011{111110011111001111100111110011....{111110011111001111100111110011
I need to transform the above data to a table or json as below with following columns,我需要将上述数据转换为表格或 json,如下所示,
Column 1 - Country第 1 列 - 国家
Column 2 - Year第 2 栏 - 年份
Column 3 - Month{1-12)第 3 列 - 月{1-12)
Column 4 - Days (1-31)第 4 栏 - 天数 (1-31)
Column 5 - Working Days of Particular Month ( 1 or 0 based on number of days present in flat file)第 5 列 - 特定月份的工作日(1 或 0 基于平面文件中的天数)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.