import pandas as pd
import os
curdir = os.path.abspath('./..')
df = pd.read_csv(os.path.join(curdir, 'scraped_data', 'department_all.csv'))
df
<class 'pandas.core.frame.DataFrame'> Int64Index: 500 entries, 0 to 499 Data columns (total 77 columns): surplus 0 non-null values home_tax_rate 300 non-null values land_property_tax_cuts_on_deliberation 0 non-null values mandatory_contributions_and_stakes 500 non-null values business_tax_cuts_on_deliberation 0 non-null values property_tax_rate 500 non-null values subsidies_and_contingents 500 non-null values financing_capacity 500 non-null values individual_aids 500 non-null values compensation_2010_rate 100 non-null values operating_revenues 500 non-null values business_tax_value 200 non-null values property_tax_cuts_on_deliberation 200 non-null values property_tax_value 500 non-null values land_property_tax_basis 300 non-null values pch 500 non-null values received_subsidies 500 non-null values business_network_tax_value 200 non-null values net_profit 500 non-null values business_profit_contribution_basis 200 non-null values home_tax_cuts_on_deliberation 0 non-null values fctva 500 non-null values thirdparty_balance 500 non-null values advertisement_tax 500 non-null values paid_subsidies 500 non-null values business_tax_rate 200 non-null values population 500 non-null values name 500 non-null values operating_real_revenues 500 non-null values business_profit_contribution_cuts_on_deliberation 200 non-null values business_profit_contribution_value 200 non-null values insee_code 500 non-null values direct_tax 500 non-null values compensation_2010_basis 0 non-null values zone_type 500 non-null values refund_tax 500 non-null values land_property_tax_value 300 non-null values investments_direct_costs 500 non-null values staff_costs 500 non-null values investment_ressources 500 non-null values financial_costs 500 non-null values subsidies 500 non-null values year 500 non-null values compensation_2010_value 100 non-null values operating_costs 500 non-null values debt_repayments 500 non-null values sold_fixed_assets 500 non-null values purchases_and_external_costs 500 non-null values residual_financing_capacity 500 non-null values training_and_learning_allocation 0 non-null values apa 500 non-null values debt_at_end_year 500 non-null values business_network_tax_cuts_on_deliberation 0 non-null values global_profit 500 non-null values business_tax_basis 200 non-null values compensation_2010_cuts_on_deliberation 0 non-null values property_tax_basis 500 non-null values business_profit_contribution_rate 0 non-null values tipp 500 non-null values operating_real_costs 500 non-null values other_tax 500 non-null values home_tax_basis 300 non-null values business_network_tax_rate 0 non-null values allocation 500 non-null values home_tax_value 300 non-null values loans 500 non-null values realignment 500 non-null values investments_usage 500 non-null values self_financing_capacity 500 non-null values land_property_tax_rate 300 non-null values url 500 non-null values debt_repayment_capacity 0 non-null values debt_annual_costs 500 non-null values business_network_tax_basis 0 non-null values rsa 500 non-null values allocation_and_stake 500 non-null values accomodation_costs 500 non-null values dtypes: float64(71), int64(2), object(4)
df[['name', 'year', 'net_profit', 'tipp', 'staff_costs', 'financial_costs', 'debt_repayments', 'allocation', 'rsa']].head(n=20)
name | year | net_profit | tipp | staff_costs | financial_costs | debt_repayments | allocation | |
---|---|---|---|---|---|---|---|---|
0 | GUADELOUPE | 2008 | 92829000 | 148570000 | 82705000 | 4175000 | 10907000 | 134943000 |
1 | MARTINIQUE | 2008 | 17369000 | 141085000 | 99253000 | 15389000 | 24974000 | 163628000 |
2 | GUYANE | 2008 | 22511000 | 53010000 | 69577000 | 2382000 | 10135000 | 45006000 |
3 | REUNION | 2008 | 2171000 | 330301000 | 179909000 | 20939000 | 51914000 | 366298000 |
4 | PARIS | 2008 | 93270000 | 239012000 | 189455000 | 0 | 0 | 26392000 |
5 | VAL-D'OISE | 2008 | -591000 | 71890000 | 124553000 | 26568000 | 54426000 | 159029000 |
6 | DU VAL-DE-MARNE | 2008 | 60463000 | 100857000 | 299751000 | 13190000 | 13084000 | 227430000 |
7 | SEINE-SAINT-DENIS | 2008 | 66861000 | 201658000 | 306794000 | 34708000 | 83685000 | 276206000 |
8 | HAUTS-DE-SEINE | 2008 | 238981000 | 93241000 | 274342000 | 13971000 | 34482000 | 267202000 |
9 | ESSONNE | 2008 | 20779000 | 65077000 | 175881000 | 26518000 | 104511000 | 163354000 |
10 | YVELINES | 2008 | 140086000 | 49038000 | 144439000 | 0 | 0 | 144000000 |
11 | SEINE-ET-MARNE | 2008 | 75792000 | 51295000 | 174560000 | 34444000 | 50666000 | 157431000 |
12 | MARNE | 2008 | 73139000 | 33243000 | 68231000 | 7993000 | 30428000 | 82791000 |
13 | AUBE | 2008 | 32056000 | 21946000 | 45237000 | 2421000 | 2677000 | 62022000 |
14 | ARDENNES | 2008 | 19373000 | 25531000 | 57627000 | 6368000 | 11318000 | 72219000 |
15 | HAUTE-MARNE | 2008 | 13622000 | 10570000 | 36338000 | 549000 | 3072000 | 50506000 |
16 | OISE | 2008 | 51250000 | 42285000 | 111840000 | 10058000 | 18064000 | 143562000 |
17 | SOMME | 2008 | 40096000 | 43030000 | 91033000 | 10734000 | 23901000 | 114224000 |
18 | AISNE | 2008 | 29198000 | 31453000 | 77310000 | 9761000 | 14897000 | 109209000 |
19 | EURE | 2008 | 50988000 | 29860000 | 71345000 | 8603000 | 17716000 | 102709000 |