Is there any way where I can get the message [value column data] from Spark Dataframe into a string variable?

I want to get only first message from Kafka producer and based on that message I will get schema from that first record and apply that schema to upcoming records.

Is there any way by which I can get the value column - first row -- cell data to python string?

# I have config spark kafka readStream 
df_stream = spark \
    .readStream \
    .format("kafka") \
    .option("kafka.bootstrap.servers", bootstrap_kafka_server) \
    .option("subscribe", topic) \
    .option("inferSchema", "true") \

# since the data - value column in Byte Array I have converted that data into String.

df_stream_value ="string").alias('value'))\

query = df_stream_value.writeStream.outputMode("complete").format("console").start()

#  # get the name of the auto-generated or user-specified name
# query.explain()  # print detailed explanations of the query

if df_stream_value.head().getInt(0) > 0:

# def process_row(row):