Datasets:
Download examples/fixed_example.py from pushkar87dg/pypi-api-drift: direct link, hf CLI and curl.
- Browser
- Download file 242 Bytes
-
https://huggingface.co/datasets/pushkar87dg/pypi-api-drift/resolve/main/examples/fixed_example.py
- Command line
-
hf download hf://datasets/pushkar87dg/pypi-api-drift/examples/fixed_example.py
-
curl -L -o fixed_example.py https://huggingface.co/datasets/pushkar87dg/pypi-api-drift/resolve/main/examples/fixed_example.py
242 Bytes
| import pandas as pd | |
| df = pd.DataFrame({"a": [1, 2]}) | |
| df = pd.concat([df, pd.DataFrame({"a": [3]})], ignore_index=True) | |
| for k, v in df.items(): | |
| print(k) | |
| df.to_csv("x.csv", lineterminator="\n") | |
| x = pd.read_csv("x.csv", on_bad_lines="skip") | |