---
title: "Discussion on \"US duty rates are not numbers: parsing 747 rate formats from the tariff schedule in Python\" | Hashnode"
description: "Discussion on \"US duty rates are not numbers: parsing 747 rate formats from the tariff schedule in Python\". The duty rate column of the US tariff schedule looks like the easy part. It reads like a percentage: 6.5%, 3.7%, Free. Try float(rate.rstrip(\"%\")) on it, though, and it fails on the very first declara"
url: "https://hashnode.com/posts/us-duty-rates-are-not-numbers-parsing-747-rate-formats-from-the-tariff-schedule-in-python/6afa48cb39e3c3a7a9160f21"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [US duty rates are not numbers: parsing 747 rate formats from the tariff schedule in Python](https://anders.hashnode.dev/us-duty-rates-are-not-numbers-parsing-747-rate-formats-from-the-tariff-schedule-in-python?utm_source=hashnode&utm_medium=feed)

The duty rate column of the US tariff schedule looks like the easy part. It reads like a percentage: 6.5%, 3.7%, Free. Try float(rate.rstrip("%")) on it, though, and it fails on the very first declara

3d ago · 7 min read · anders.hashnode.dev  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#data](https://hashnode.com/tag/data)
-   [#parsing](https://hashnode.com/tag/parsing)
-   [#opendata](https://hashnode.com/tag/opendata)

## Written by

[anders lee](https://hashnode.com/@anderslee)

@anderslee

  
[View profile](https://hashnode.com/@anderslee)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
