0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

輸出統計のデータ加工

Posted at

from dash_url.customs2 import trade_stat_set_for_hs_code2
import pandas as pd
from glob import glob

PATH=r"C:\Users....\customs\ik-300h*.csv"

hs_code=str(hs_code)
paths=glob(PATH)
path=paths[0]

df=pd.read_csv(path)
months=[s.replace('Value-','') for s in
df.columns[df.columns.str.contains('Value-')]]
months=[s for s in months if s!='Year' ]

li=[s for s in df.columns]
value_start_from=li.index('Quantity1-Year')

month=months[0]
line[line.index.str.contains(month)]+df.iloc[0,:value_start_from]

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?