Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
import pandas as pd url = "http://www.sejm.gov.pl/Sejm9.nsf/agent.xsp?symbol=glosowania&NrKadencji=9&NrPosiedzenia=18&NrGlosowania=1" df = pd.read_html(url, encoding='utf-8')[0] columns = [c for c in df.columns.to_list() if c!="Klub/Koło"] objects = [x for x in columns if df[x].dtype==object and x!="Klub/Koło"] def obj_to_int(df,columns): for c in columns: df[c] = df[c].map(lambda x: 0 if x=="-" else int(x)) return df df2 = obj_to_int(df, columns) print(df2) df2.to_csv("sejm.csv")
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)