Spaces:
Sleeping
Sleeping
adding app.py and requirements.txt
Browse files- app.py +17 -0
- requirements.txt +1 -0
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Install necessary packages
|
2 |
+
# !pip install datasets pandas
|
3 |
+
|
4 |
+
from datasets import load_dataset
|
5 |
+
import pandas as pd
|
6 |
+
|
7 |
+
# Load the dataset from Hugging Face
|
8 |
+
ds = load_dataset("egecandrsn/weatherdata")
|
9 |
+
|
10 |
+
# Access the 'train' split
|
11 |
+
train_df = ds['train']
|
12 |
+
|
13 |
+
# Convert the dataset to a pandas DataFrame for easier viewing
|
14 |
+
df = pd.DataFrame(train_df)
|
15 |
+
|
16 |
+
# Display the first few rows of the dataset
|
17 |
+
print(df.head())
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
datasets
|