Skip to content

Instantly share code, notes, and snippets.

@pjastr
Created May 23, 2019 21:17
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 pjastr/441bccba847122e3640c22bac5c79c31 to your computer and use it in GitHub Desktop.
Save pjastr/441bccba847122e3640c22bac5c79c31 to your computer and use it in GitHub Desktop.
import pandas as pd
data = pd.read_csv("miasta.csv", sep=";", index_col=0)
data2 = data.stack()
data3 = data2[data2 > 0]
data4 = data3.drop_duplicates(keep="first")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment