Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
# Read the data
|
2 |
import pandas as pd
|
3 |
df = pd.read_csv('./Automobile_data.csv')
|
4 |
-
df = df.drop(columns = ['normalized-losses','symboling'], axis = 1)
|
5 |
|
6 |
context_data = []
|
7 |
for i in range(len(df)): # Loop over rows
|
8 |
context = ""
|
9 |
-
for j in range(
|
10 |
context += df.columns[j] # Add column name
|
11 |
context += ": "
|
12 |
context += str(df.iloc[i][j]) # Convert value to string
|
|
|
1 |
# Read the data
|
2 |
import pandas as pd
|
3 |
df = pd.read_csv('./Automobile_data.csv')
|
4 |
+
#df = df.drop(columns = ['normalized-losses','symboling'], axis = 1)
|
5 |
|
6 |
context_data = []
|
7 |
for i in range(len(df)): # Loop over rows
|
8 |
context = ""
|
9 |
+
for j in range(26): # Loop over the first 8 columns
|
10 |
context += df.columns[j] # Add column name
|
11 |
context += ": "
|
12 |
context += str(df.iloc[i][j]) # Convert value to string
|