Spaces:
Sleeping
Sleeping
Commit
Β·
30a7a75
1
Parent(s):
a7db64a
clean up
Browse files
currency.py β Dataset_prep/currency.py
RENAMED
@@ -1,8 +1,8 @@
|
|
1 |
import pandas as pd
|
2 |
|
3 |
# Load the CSV files
|
4 |
-
csv1_file = 'currencyrates.csv' # Replace with the path to your CSV1 file
|
5 |
-
csv2_file = 'countrycurrency.csv' # Replace with the path to your CSV2 file
|
6 |
|
7 |
# Read the CSVs into DataFrames
|
8 |
df1 = pd.read_csv(csv1_file) # This CSV contains just currency codes
|
|
|
1 |
import pandas as pd
|
2 |
|
3 |
# Load the CSV files
|
4 |
+
csv1_file = r'currencyrates.csv' # Replace with the path to your CSV1 file
|
5 |
+
csv2_file = r'countrycurrency.csv' # Replace with the path to your CSV2 file
|
6 |
|
7 |
# Read the CSVs into DataFrames
|
8 |
df1 = pd.read_csv(csv1_file) # This CSV contains just currency codes
|
dataset_prep.py β Dataset_prep/dataset_prep.py
RENAMED
File without changes
|
flight_distance.py
CHANGED
@@ -3,7 +3,7 @@ from math import *
|
|
3 |
|
4 |
def get_aircraft_details(aircraft_type):
|
5 |
# Load the CSV file
|
6 |
-
csv_file = 'aircraft.csv' # Replace with the actual path if needed
|
7 |
df = pd.read_csv(csv_file)
|
8 |
|
9 |
# Check if the aircraft type exists in the DataFrame
|
@@ -36,7 +36,7 @@ def get_airport_lat_long(identifiers):
|
|
36 |
return "Please provide at least two airport identifiers."
|
37 |
|
38 |
# Load the CSV file
|
39 |
-
csv_file = 'airport.csv' # Replace with the actual path if needed
|
40 |
df = pd.read_csv(csv_file)
|
41 |
|
42 |
# Efficiently filter rows where the 'Name' or 'IATA' matches any of the provided identifiers
|
|
|
3 |
|
4 |
def get_aircraft_details(aircraft_type):
|
5 |
# Load the CSV file
|
6 |
+
csv_file = r'aircraft.csv' # Replace with the actual path if needed
|
7 |
df = pd.read_csv(csv_file)
|
8 |
|
9 |
# Check if the aircraft type exists in the DataFrame
|
|
|
36 |
return "Please provide at least two airport identifiers."
|
37 |
|
38 |
# Load the CSV file
|
39 |
+
csv_file = r'airport.csv' # Replace with the actual path if needed
|
40 |
df = pd.read_csv(csv_file)
|
41 |
|
42 |
# Efficiently filter rows where the 'Name' or 'IATA' matches any of the provided identifiers
|
main.py
CHANGED
@@ -14,7 +14,7 @@ trip_distance = calculate_distances(airport_identifiers)
|
|
14 |
print("Distance b/w Airports: \n",trip_distance)
|
15 |
|
16 |
#Get onroute weather
|
17 |
-
weather =
|
18 |
print("On Route weather: \n", weather)
|
19 |
|
20 |
# # Ensure the graph is bidirectional (undirected)
|
|
|
14 |
print("Distance b/w Airports: \n",trip_distance)
|
15 |
|
16 |
#Get onroute weather
|
17 |
+
weather = fetch_weather_for_all_routes(airport_identifiers,lat_long_dict)
|
18 |
print("On Route weather: \n", weather)
|
19 |
|
20 |
# # Ensure the graph is bidirectional (undirected)
|