#!/usr/bin/python3

import pandas as pd


# DataFrame with index starting at 1
cities = [
            ["Guaíba", "Rio Grande do Sul", "Brazil"],
            ["Xalapa", "Veracruz", "Mexico"],
            ["San Antonio", "Texas", "USA"],
            ["Campinas", "São Paulo", "Brazil"]
        ]

df = pd.DataFrame(cities, columns = ["City", "State", "Country"])
df.index += 1

print("Simple DataFrame:\n")
print(df)

print("\nUpdating Row Label 3 / Column Label 'City':\n")
df.at[4, "City"] = "Itupeva"
print(df)

print("\nUpdating Row Index 1 / Column Integer 0:\n")
df.iat[1, 0] = "Xalapa-Enríquez"
print(df)

1df3102f6e0b84f8441f8525a5909060f20a57fb
<mask token>

<mask token>
df.index += 1
print('Simple DataFrame:\n')
print(df)
print("""
Updating Row Label 3 / Column Label 'City':
""")
<mask token>
print(df)
print("""
Updating Row Index 1 / Column Integer 0:
""")
<mask token>
print(df)

<mask token>
cities = [['Guaíba', 'Rio Grande do Sul', 'Brazil'], ['Xalapa', 'Veracruz',
    'Mexico'], ['San Antonio', 'Texas', 'USA'], ['Campinas', 'São Paulo',
    'Brazil']]
df = pd.DataFrame(cities, columns=['City', 'State', 'Country'])
df.index += 1
print('Simple DataFrame:\n')
print(df)
print("""
Updating Row Label 3 / Column Label 'City':
""")
df.at[4, 'City'] = 'Itupeva'
print(df)
print("""
Updating Row Index 1 / Column Integer 0:
""")
df.iat[1, 0] = 'Xalapa-Enríquez'
print(df)

import pandas as pd
cities = [['Guaíba', 'Rio Grande do Sul', 'Brazil'], ['Xalapa', 'Veracruz',
    'Mexico'], ['San Antonio', 'Texas', 'USA'], ['Campinas', 'São Paulo',
    'Brazil']]
df = pd.DataFrame(cities, columns=['City', 'State', 'Country'])
df.index += 1
print('Simple DataFrame:\n')
print(df)
print("""
Updating Row Label 3 / Column Label 'City':
""")
df.at[4, 'City'] = 'Itupeva'
print(df)
print("""
Updating Row Index 1 / Column Integer 0:
""")
df.iat[1, 0] = 'Xalapa-Enríquez'
print(df)

#!/usr/bin/python3

import pandas as pd


# DataFrame with index starting at 1
cities = [
            ["Guaíba", "Rio Grande do Sul", "Brazil"],
            ["Xalapa", "Veracruz", "Mexico"],
            ["San Antonio", "Texas", "USA"],
            ["Campinas", "São Paulo", "Brazil"]
        ]

df = pd.DataFrame(cities, columns = ["City", "State", "Country"])
df.index += 1

print("Simple DataFrame:\n")
print(df)

print("\nUpdating Row Label 3 / Column Label 'City':\n")
df.at[4, "City"] = "Itupeva"
print(df)

print("\nUpdating Row Index 1 / Column Integer 0:\n")
df.iat[1, 0] = "Xalapa-Enríquez"
print(df)
