9

I am working in Python on a Jupyter Notebook, and I got this warning:

WARNING:root:'PYARROW_IGNORE_TIMEZONE' environment variable was not set.

I tried to remove it, but I couldn't. I tried to set PYARROW_IGNORE_TIMEZONE to 1, as I saw on some forums but it didn't work.

Here is my code :

PYARROW_IGNORE_TIMEZONE=1
import databricks.koalas as ks
import pyspark
from pyspark.sql import SparkSession, functions
from pyspark.sql.types import *
import datetime

What's wrong with it ?

I am using spark and koalas.

Zoe
  • 27,060
  • 21
  • 118
  • 148
Ousen92i
  • 137
  • 1
  • 8

1 Answers1

17

If you want to set environment variable, you should use os. Otherwise you're just setting the variable in Python, but it doesn't get exported to the environment.

import os
os.environ["PYARROW_IGNORE_TIMEZONE"] = "1"
mck
  • 40,932
  • 13
  • 35
  • 50