模拟:https://creativedata.atlassian.net/wiki/spaces/SAP/pages/61177860/Python+-+Read+Write+files+from+HDFS

import pandas as pd
from hdfs import InsecureClient
import os client_hdfs = InsecureClient('http://(your name node ip adress):50070/',user='hadoop')
# Creating a simple Pandas DataFrame
liste_hello = ['hello1','hello2']
liste_world = ['world1','world2']
df = pd.DataFrame(data = {'hello' : liste_hello, 'world': liste_world}) # Writing Dataframe to hdfs
with client_hdfs.write('/Learn/input/helloworld.csv', encoding = 'utf-8') as writer:
df.to_csv(writer)

最新文章

  1. TestNG插件的安装问题
  2. [nRF51822] 3、 新年也来个总结——图解nRF51 SDK中的Button handling library和FIFO library
  3. 数据结构:C_顺序栈的实现
  4. 【mysql创建用户|删除用户|修改用户权限|常用命令】
  5. C# 常用加密处理
  6. OpenJudge计算概论-称体重【枚举法、信息数字化】
  7. Android SlidingMenu开源库及其使用
  8. Git和Github的应用与命令方法总结
  9. .net开发框架设计
  10. 301跳转:IIS服务器网站整站301永久重定向设置方法(阿里云)
  11. Maven的安装环境配置
  12. 【集训第三天·疯狂训练】哦,顺带学习了manacher
  13. MacTalk·人生元编程 - 读书笔记
  14. C++对象生存期&&static
  15. jenkins的sbt插件安装
  16. NFS存储服务
  17. go在ubuntu下安装
  18. Learning-MySQL【3】:数据类型和运算符
  19. angularJs中$controller的使用
  20. CentOS忘记root密码解决办法

热门文章

  1. JS jquery ajax 已看1 有用
  2. 业务逻辑:shiro框架的功能实现
  3. 华为2013年西安java机试题目:如何过滤掉数组中的非法字符。
  4. elasticsearch 6.2.4 安装 elasticsearch-analysis-ik 分词器 (windows 10下)
  5. 269D Maximum Waterfall
  6. niginx隐藏入口文件index.php
  7. tomcat的日志文件权限与启动用户的权限不一致
  8. day05.1-文件归档与压缩
  9. php excel开发01
  10. SQL基础(一)