How to send a dataframe as an argument to a python script with spark-submit using subprocess. I have tried the below code but did not work out as we cant concatenate string and an object.
def spark_submit(self, test_cases, email):
command = 'spark-submit TestRunner.py '+test_cases+" "+email
print(command)
process = subprocess.Popen([command], shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
output, error = process.communicate()
status = process.returncode
print(status)```