Support Questions

Find answers, ask questions, and share your expertise

How to write to HDFS remotely using pandas

avatar
Explorer

Suppose I have below code:

```python
import pandas as pd

df = pd.read_csv(SOME_PATH)

df.to_csv(OUTPATH,index=False)
```

 

How do I configure OUTPATH to be HDFS?

 

1 ACCEPTED SOLUTION

avatar
Super Collaborator

Hi @Ben1996, As this is very specific use case, I don't see any Cloudera doc which could cover this. The basic requirements would be to import the hdfs module and provide the HDFS configs.

 

For ex, https://tahiriamine9.medium.com/python-hdfs-cd822199799e#:~:text=Let's%20have%20an%20example%20of,in....

View solution in original post

3 REPLIES 3

avatar
Community Manager

@Ben1996, Welcome to our community! To help you get the best possible answer, I have tagged in our HDFS experts @willx @ChethanYM @Chella  who may be able to assist you further.

Please feel free to provide any additional information or details about your query, and we hope that you will find a satisfactory solution to your question.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community:

avatar
Super Collaborator

Hi @Ben1996, As this is very specific use case, I don't see any Cloudera doc which could cover this. The basic requirements would be to import the hdfs module and provide the HDFS configs.

 

For ex, https://tahiriamine9.medium.com/python-hdfs-cd822199799e#:~:text=Let's%20have%20an%20example%20of,in....

avatar
Community Manager

@Ben1996, Has the reply helped resolve your issue? If so, please mark the appropriate reply as the solution, as it will make it easier for others to find the answer in the future.



Regards,

Vidya Sargur,
Community Manager


Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.
Learn more about the Cloudera Community: