Am trying to write live data from an online csv

On the Web UI, it only shows tags without fields. The data only appears later, after I shut down my PC. Below is my code. I scheduled the data to be written every 15 seconds, but it does not show any data on the web. Please help

from datetime import datetime
import pandas as pd
import schedule
import time

from influxdb_client import InfluxDBClient, Point, WritePrecision
from influxdb_client.client.write_api import SYNCHRONOUS

You can generate a Token from the “Tokens Tab” in the UI

token = “9o2rIXlQSgAUEzLmRl8wrEjDGKJMe9vyHw_sk1fBuJ1OJVCHJBdH_muJ6SiGsd7VpcU-LVTdNjhNcw7nR56dZA==”
org = “Filtrona”
bucket = “Machines3”

client = InfluxDBClient(url=“http://localhost:8086”, token=token)
write_api = client.write_api(write_options=SYNCHRONOUS)

Configure the batch size for data points

batch_size = 25

def fetch_and_store_data():
df = pd.read_csv(“”, skiprows = [1])
df[‘Date’] = pd.to_datetime(df[‘Date’].str.replace(r’(\w+). (\d+)‘, r’\1 \2’, regex=True), format=“%Y-%b %d. %H:%M:%S”)
df.set_index([‘Date’], inplace=True)

    # Batch data points and write in batches
    for chunk in range(0, len(df), batch_size):
        batch_data = df.iloc[chunk:chunk + batch_size]
        write_api.write(bucket, org, record=batch_data, data_frame_measurement_name="Machine",
        print(f"Batch of {batch_size} data points fetched and stored in InfluxDB., Data Below:")

except Exception as e:
    print("An error occurred:", e)

Schedule the fetch_and_store_data function to run every 2 seconds


while True: