Skip to content

Instantly share code, notes, and snippets.

@soichisumi
Last active September 30, 2017 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soichisumi/32240c0b9661872f7787fe4329d44475 to your computer and use it in GitHub Desktop.
Save soichisumi/32240c0b9661872f7787fe4329d44475 to your computer and use it in GitHub Desktop.
都道府県+市区町村の名前の最大長を調べた
import pandas as pd
import math as ma
import sys
import googlemaps
df = pd.read_csv('jusho.csv')
maxlen=0
maxlenKen=0
maxlenSi=0
for key, row in df.iterrows():
if maxlenKen<len(row[1]):
maxlenKen=len(row[1])
if not row.isnull()[2] and maxlenSi<len(row[2]):
maxlenSi=len(row[2])
maxLen=11
maxlenKen=4
maxlenSi=7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment